100% Client-Side • Zero Uploads • Free Forever
CSP Header Debugger & Policy Simulator
Paste any Content-Security-Policy header to audit security bypasses, test resource URLs against W3C fallback directives, and compute SHA-256 script hashes locally.
Security Audit & Simulation
Parsed Directives & Hardened CSP
How to Use CSP Header Debugger & Simulator
Step 1: Load Input
Paste your Content-Security-Policy header string into the input box.
Step 2: Configure & Run
Select a resource directive and enter a test URL to simulate whether it is allowed or blocked.
Step 3: Inspect & Export
Review security weaknesses and copy the hardened CSP or SHA-256 inline script hash.
Frequently Asked Questions
Why is unsafe-inline dangerous in script-src?
Allowing unsafe-inline lets injected inline <script> tags execute, defeating CSP XSS protection.
How do I allow a specific inline script safely?
Use the Compute SHA-256 button to generate a cryptographic hash or use per-request nonces.
What happens if a directive like connect-src is omitted?
Browsers fall back to default-src if present, or allow all origins if default-src is also missing.