About This Tool
Create Content-Security-Policy (CSP) headers to protect your website from XSS attacks, data injection, and other code execution vulnerabilities.
How to Use
- Configure each CSP directive (default-src, script-src, etc.)
- Add allowed sources for each directive
- Click Generate to create the CSP header
- Add the header to your server configuration or meta tag
FAQ
What is Content-Security-Policy?
CSP is an HTTP header that tells browsers which sources of content are allowed to load on your page, preventing XSS and injection attacks.