CSP Header Generator
Build a Content-Security-Policy header or meta tag.
Want to create short URLs? Sign up for free to get started.
About CSP Header Generator
Create a Content Security Policy (CSP) to reduce XSS risk and control which resources your site can load. Fill in the directives you need and copy the header or meta tag output.
How to use
- Pick a starter template or enter directives manually.
- Copy the header output or meta tag.
- Deploy, then iterate based on browser console reports.
Privacy
No data is sent anywhere. Everything stays in your browser.
For resource integrity and response header checks, see SRI Hash Generator, HTTP Header Checker, and SSL Checker.
Related Tools
More tools you may find useful.