CSP Header Generator โ€” Free & Private

A free edge API by formatho.com, privacy-first developer tools.

Open the full browser tool →

Free, no signup, runs entirely in your browser — your data never leaves your device.

๐Ÿ”“ Free๐Ÿ”’ Zero tracking๐Ÿšซ No data collectionโšก Edge-fast

Usage โ€” enforce mode

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.

Usage โ€” report-only mode

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.

Privacy-first: generation runs in-memory at the edge and is never logged or stored.

Full browser tool

Build policies with a full UI: CSP Generator on formatho.com.

All Formatho edge APIs

Browse every free Formatho Worker tool on the Formatho Tools index.