SimplyScan logoSimplyScan
What We ScanPricingFree ToolsBlogCreate AccountLog In
  1. Home
  2. Free Tools
  3. CSP Evaluator
Free Tool · Browser evaluation · optional server fetch

Free Content Security Policy (CSP) Evaluator

Paste a Content-Security-Policy and get an A-F grade · with specific fixes for unsafe-inline, unsafe-eval, wildcards, and missing directives.

Pasted policies are evaluated in your browser. Fetching a URL sends that URL to SimplyScan to read its public headers and HTML.

Preview · sign in with a free account to run it

How to use it

  1. Paste the value of your Content-Security-Policy header, or enter a URL to fetch the policy the site sends.
  2. Read the grade from A to F and the findings, from dangerous to informational.
  3. Apply the fix each finding suggests, such as nonces instead of 'unsafe-inline', or adding object-src 'none'.
  4. Paste the new policy to confirm the grade went up before you deploy it.

Example

Input

default-src 'self'; script-src 'self' 'unsafe-inline'; object-src 'none'

Result

Grade D · 49 / 100

✗ script-src allows 'unsafe-inline' · inline scripts run freely,
  defeating most XSS protection. Use nonces or hashes instead.
⚠ No base-uri · an injected <base> tag can hijack relative URLs.
⚠ No frame-ancestors · the page can be framed (clickjacking).

What the findings cost

No default-src or script-src (−40)
Nothing restricts which scripts may run, so the policy gives no protection against cross-site scripting.
'unsafe-inline' in script-src (−35)
Any inline script runs, including one an attacker injects. Use a nonce or hash for each inline script you need.
Wildcard source: *, https: or http: (−30)
Scripts may load from any host, so an attacker only needs a file somewhere on the internet.
'unsafe-eval' (−20)
eval() and new Function() are allowed, a common path for injected code.
data: in script-src (−15)
Scripts can be inlined as data: URLs.
object-src, base-uri, frame-ancestors (−8 each)
Missing guards against plugin content, <base> hijacking and clickjacking.
Grade bands
Penalties are subtracted from 100. A is 90 and above, B 75, C 60, D 45, E 25, and F below that.

A strict starting policy

Send it as Content-Security-Policy-Report-Only first, watch the browser console for blocked resources, then switch to the enforcing header.

Nonce-based policy

default-src 'self';
script-src 'self' 'nonce-{RANDOM}' 'strict-dynamic';
object-src 'none';
base-uri 'none';
frame-ancestors 'none'

{RANDOM} must be a new random value on every response, and the same value goes on each <script nonce="…"> tag.

Go deeper

  • Content Security Policy for Vibe-Coded Apps: A Practical CSP Guide
  • XSS Prevention Guide: Protect Your AI-Built App from Cross-Site Scripting

Page updated 21 November 2026

Frequently asked questions

What makes a CSP weak?

The most common weaknesses are 'unsafe-inline' and 'unsafe-eval' in script-src (they defeat most XSS protection), wildcard * sources, missing object-src 'none', and no default-src fallback. The evaluator flags each and explains the fix.

Is my policy uploaded anywhere?

Pasted policy text is evaluated in your browser. The optional URL fetch sends the URL to SimplyScan, which reads the public response headers and HTML and returns its CSP policies.

My framework adds inline scripts. Do I need 'unsafe-inline'?

Usually not. Next.js, Remix and most SSR frameworks can attach a nonce to the scripts they generate. Static sites can use hashes of each inline script instead.

Is a weak CSP worse than none?

Not worse, but a policy with 'unsafe-inline' and wildcards stops almost nothing while looking protective. The grade tells you how much it actually blocks.

Want the full picture?

This tool covers one narrow check. A full SimplyScan runs 60 checks across 14 categories · exposed keys, RLS, XSS, auth, and speed · in 30 seconds.

Run a full security scan

Related tools

Password Strength Checker

Test any password's strength · entropy, estimated crack time, and detection of common patterns and dictionary words.

Email Header Analyzer

Paste raw email headers and get the story: did SPF, DKIM and DMARC pass, what path did the message take, and does anything look spoofed.

Punycode Converter

Convert Unicode domains to xn-- punycode and back · and check whether a domain mixes scripts the way phishing lookalikes do.

SimplyScan logoSimplyScan

Security Scanner for Vibe-Coded Apps.

Product

See What We ScanHow It WorksView Pricing

Resources

Security BlogSecurity ChecklistTrust BadgeUptime MonitoringIntegrationsMCP Server (Claude, Cursor & Windsurf)API DocumentationBackend Audit GuideThreat Detection GuideFAQTerms of ServicePrivacy Policy

Platforms

All platforms →Lovable ScannerBolt.new ScannerCursor ScannerReplit Scannerv0.dev ScannerWindsurf ScannerBubble Scanner

Free Tools

All free tools →SSL CheckerSecurity HeadersDNS Security CheckerCORS TesterJWT DebuggerCSP EvaluatorHash GeneratorSEO Checker

Account

Create AccountLog In

© 2026 SimplyScan. All rights reserved.