Free Content Security Policy checker
Read a website's Content-Security-Policy and see whether it is enforced and blocks inline scripts.
Example report
example.com- 2 Low
Content Security Policy allows inline scriptsexample.comLow
The policy's script-src allows 'unsafe-inline' with no nonce or hash.
Next step
Move inline scripts into files, or use nonces or hashes, then remove 'unsafe-inline' from script-src.
No Content Security Policywww.example.comLow
https://www.example.com/ answered without a Content-Security-Policy header.
Next step
Start with a report-only policy (
Content-Security-Policy-Report-Only) to see what your pages load, then enforce a policy such asdefault-src 'self'plus the sources you need.
Content-Security-Policy
example.com
| Directive | Sources |
|---|---|
| default-src | 'self' |
| script-src | 'self''unsafe-inline'https://cdn.example.com |
| style-src | 'self''unsafe-inline' |
| img-src | 'self'data: |
| frame-ancestors | 'self' |
www.example.com
No Content-Security-Policy header is sent.
What the CSP check looks at
The policy
Read the Content-Security-Policy header, directive by directive.
Enforcement
Treat a report-only policy on its own as no policy.
Inline scripts
Flag script-src that allows 'unsafe-inline' without a nonce or hash.
Other unsafe sources
Highlight 'unsafe-eval' and similar, without judging them.
Only the home page is read; other pages can send a different policy.
Understand the issue and your next step
Each finding explains what we found, why it matters and what you can change. Start with the issues that need attention, then open the evidence when you want the detail.
- Enter your domain
- Review the findings
- Follow the fix guides
Content Security Policy allows inline scriptsLow
The Content Security Policy permits 'unsafe-inline' scripts without a nonce or hash.
script-src 'self' 'unsafe-inline' https://cdn.example.comAllowing inline scripts removes most of the protection a policy gives against cross-site scripting.
Move inline scripts into files, or use nonces or hashes, then remove 'unsafe-inline' from script-src.
Common CSP issues you can put right
No Content Security PolicyLow
A CSP tells browsers which sources your pages can load. Start by understanding what your site needs, then test a policy before enforcing it.
Content Security Policy allows inline scriptsLow
'unsafe-inline' lets injected scripts run, which is most of what a policy protects against. Move inline scripts to files, or allow them by nonce or hash.
Keep watch after you've fixed it
Ironfang Security rechecks a verified domain every week or every day and tells you what changed: new findings, fixes and certificates nearing expiry.
Free during the preview. Domain verification required.
- NewIssue detected
- FixedConfirmed by recheck
- ReopenedDetected again
How the check works
- The
Content-Security-Policyheader on the final HTTPS response for the home page, for the domain and itswww.name, or the subdomain entered. - Whether a policy is enforced. A
Content-Security-Policy-Report-Onlyheader on its own counts as no policy, because browsers only report against it. - Whether
script-src, ordefault-srcwhere there is noscript-src, contains'unsafe-inline'without a nonce, a hash or'strict-dynamic'. - Other
'unsafe-'sources, such as'unsafe-eval', are highlighted in the directive table but not judged.
Reading a result
A Content Security Policy lists where a page may load scripts, styles, frames and other content from. If an attacker manages to inject markup into the page, the browser refuses to run script the policy does not allow, which limits what a cross-site scripting bug can do.
Most of that protection rests on script-src. 'unsafe-inline' lets any inline <script> block or event handler run, which is exactly what injected markup uses. Browsers ignore 'unsafe-inline' when a nonce or hash is also listed, so a policy with one is not flagged.
A pass means a policy is enforced and inline scripts are blocked. Either finding is low severity: a missing policy leaves the browser with no rules to apply, and an inline allowance keeps the rules for other content but gives up most of the protection against script injection.
What it does not do
- It is not a full CSP audit. Only inline scripts are judged. Broad sources such as
*,https:or a whole CDN host,'unsafe-eval', and missing directives such asobject-srcorbase-uripass without comment. - Only the HTTP header is read. A policy set in a
<meta http-equiv>tag is not seen, and browsers ignoreframe-ancestorsand reporting directives there anyway. - It reads the home page. Other pages, especially ones behind a login, often send a different policy.
- It does not load the page in a browser, so it cannot tell whether the policy breaks anything or what it would report.
What happens to the domain you enter
The check runs from Ironfang Security's published scanner address with the same low-impact limits as a scan. Nothing you enter is stored or logged. A result is reused for five minutes, and a certificate log search for an hour, so a repeat check is quick and the domain is not checked again.
Guides
A few things worth knowing
- Should I start with Content-Security-Policy-Report-Only?
- Usually, yes. A report-only policy shows what an enforced one would block without breaking anything. Once the reports show only sources you expect, send the same policy as Content-Security-Policy.
- Why is unsafe-inline a problem?
- Injected script is almost always inline: a script tag or an event handler slipped into the page. Allowing unsafe-inline lets it run. A nonce or hash allows only the inline scripts you wrote.
- Can a Content Security Policy go in a meta tag?
- Partly. A meta tag policy works for most directives, but not frame-ancestors, report-uri or sandbox, and it applies only to content after the tag. The HTTP header is the stronger choice, and it is the one this checker reads.

