δΈ­ζ–‡ EN

CSP Generator

Generate Content-Security-Policy HTTP headers, visually configure script-src/style-src policies, prevent XSS

Configure a Content-Security-Policy HTTP response header. Leave a field empty to omit that directive from the generated policy.

πŸ“Š Result Chart

Basic / Secure Strict Mode CDN Friendly API Service

What is CSP Generator?

CSP Generator is a free online tool that runs entirely in your browser. No download or signup needed β€” set default-src, script-src and other directives to build a Content-Security-Policy header that helps prevent XSS and injection attacks. All data is processed locally.

Use Cases

Key Features