CSP Generator (Basic)
Build a valid Content-Security-Policy string from directive/source lists
How to use CSP Generator (Basic)
- Provide directives as JSON (e.g.
defaultSrc,scriptSrc,imgSrc). - Use arrays for source lists and booleans for flag directives like
upgradeInsecureRequests. - Copy the generated string and use it in your
Content-Security-Policyheader.
This tool is a generator, not a runtime CSP debugger.
FAQ
Does it remove duplicate values?
Yes, directives and source values are normalized and deduplicated.