Content Security Policy Analyzer
Breaks a CSP into directives, flags the parts that weaken it and names the ones that are missing.
Loading the tool…
How to use this tool
- Paste the policy, with or without the Content-Security-Policy: prefix.
- Select Analyse.
- Deal with any unsafe-inline, unsafe-eval or bare wildcard first — those are the ones that undo most of the policy.
- Check for any directive reported as unknown. A misspelled directive is ignored entirely, so the policy looks longer than it is.
What csp analyzer does
A Content-Security-Policy is one long line with no punctuation to help you, which is why the weaknesses in one are so easy to miss. Each directive is broken out with its sources, and the three that undo most of the value — unsafe-inline, unsafe-eval and a bare wildcard — are called out wherever they appear rather than only in script-src.
A misspelled directive is reported, because browsers ignore an unrecognised directive in full and silently: the policy looks longer and protects less. Absent protections are listed too — no default-src leaving fetch directives unrestricted, no frame-ancestors, no base-uri. This reads the policy text only; whether your pages still work under it is what report-only mode exists to answer.