A free edge API by formatho.com, privacy-first developer tools.
Free, no signup, runs entirely in your browser — your data never leaves your device.
curl "https://csp-generator-formatho.filesformatho.workers.dev/api?default-src=self&script-src=self+cdn.example.com&base-uri=self"
Any query parameter is treated as a directive name; values are space- or comma-separated tokens. Returns the canonical Content-Security-Policy header value plus best-practice warnings.
curl "https://csp-generator-formatho.filesformatho.workers.dev/api?default-src=self&report-only=true&report-to=csp-endpoint"
Emits Content-Security-Policy-Report-Only so you can trial a policy before enforcing it.
Full parameter reference: /api endpoint.
Build policies with a full UI: CSP Generator on formatho.com.
Browse every free Formatho Worker tool on the Formatho Tools index.