CSP Analyzer
Parse a Content-Security-Policy and flag common weaknesses.
This tool needs JavaScript enabled to run in your browser.
What this tool does
Paste a Content-Security-Policy header value and this tool breaks it into its directives and flags common weaknesses: 'unsafe-inline' and 'unsafe-eval' in script-src, broad wildcards, a missing default-src, object-src or base-uri, and empty directives. It is a structural, advisory check that runs in your browser.
Why testers reach for it
A CSP is easy to write in a way that looks strict but quietly allows what it was meant to block. Reading each directive and seeing the weak points called out helps you catch a policy that would not actually stop an injected script. Checking it locally means an unreleased policy stays on your machine.
What it does not do
- It does not fetch your site or test the policy against real pages.
- It does not judge whether a given source host is one you trust.
- A clean result means no common mistakes were found, not that the policy is perfect.
Common use cases
- Reviewing a CSP before you ship it.
- Understanding a policy you inherited.
- Spotting the directive that still allows inline scripts.
Frequently asked questions
- Does it fetch my site?
- No. It is a structural check of the policy text you paste, run entirely in your browser.
- Does a clean result mean the policy is safe?
- It means no common mistakes were found. It cannot judge whether every source host you allow is one you trust.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.