CSP Generator — Content Security Policy Builder

Build Content-Security-Policy headers with a visual builder. Select directives and sources.

Help Us Improve
Be the first to rate!

Frequently Asked Questions

How do I use CSP Generator?
Select which resource types you want to allow (scripts, styles, images, fonts, etc.) and from which sources. The tool builds the Content-Security-Policy header.
Is CSP Generator free?
Yes, CSP Generator on ToolPix is 100% free with no signup or installation required.
Is my data safe?
All processing happens in your browser, your data never leaves your device.
What is a Content Security Policy?
CSP is an HTTP header that tells browsers which content sources are trusted, protecting your site against XSS and data injection attacks.
How do I add the CSP header to my website?
Add it as an HTTP response header in your server configuration (Apache, Nginx, or application code), or as a <meta http-equiv> tag in your HTML.