Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsCSP Evaluator
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский

CSP Evaluator

dev

Check a Content-Security-Policy directive by directive and see how scripts get past it

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 16 Oct 2026.

A Content-Security-Policy tells the browser where scripts and other content may load from. It protects against injected scripts only if script-src avoids 'unsafe-inline', wildcards and bypassable hosts, object-src is 'none' and base-uri is restricted. A 2016 Google study found 94.7% of real policies could be bypassed; nonces with 'strict-dynamic' fix that.

Next:
  • Security Headers Generator Choose HSTS, CSP, framing and more, then copy the nginx, Apache or Vercel config
  • SRI Hash Generator Make the integrity hash and script or link tag for a CDN file, or check one

How to check a Content-Security-Policy

1

Paste the policy, the whole Content-Security-Policy header line, or the <meta> tag that holds it.

2

Read the findings, worst first: each names the directive and what an attacker could do with it.

3

Check the table of directives for misspelt names and sources the browser will ignore.

4

Fix the policy, or start from the strict template, and paste it again until only notes remain.

About CSP Evaluator

A Content-Security-Policy is easy to get subtly wrong, and browsers never complain: a directive they cannot read is ignored. This tool reads the policy exactly as the CSP Level 3 specification says a browser does, then judges it against the findings of Google's 2016 study of real policies.

Findings, worst first.

Severity Examples
High 'unsafe-inline' without a nonce, * or https: in script-src, object-src not 'none', 'strict-dynamic' with no nonce, a missing semicolon, self without quotes
Medium 'unsafe-eval', allowlisted hosts known to serve JSONP or old AngularJS, base-uri open, plain http sources, unknown directives
Low no frame-ancestors, short nonces, obsolete directives, duplicates, 'unsafe-inline' for styles
Note no reporting, report-uri without report-to, sources a strict policy makes browsers ignore

Fallback is applied. When script-src is missing, default-src is judged in its place; when both are missing, scripts may load from anywhere and the tool says so.

Paste anything. The bare policy, the whole header line, or a <meta http-equiv> tag. Policies delivered in a meta tag cannot use frame-ancestors, report-uri or sandbox, and the tool flags those. A header with several comma-separated policies is split, since each is enforced.

Every source checked. Keywords, nonces, hashes (with the right length for SHA-256, 384 or 512), schemes and hosts are checked against the grammar, and a misspelt directive gets a suggestion, such as frame-ancestor to frame-ancestors.

Strict template. One tap loads a nonce-based policy: script-src with a nonce and 'strict-dynamic', object-src 'none' and base-uri 'none'. Your server must write a new random nonce into the header and every script tag on each response.

The policy is read in your browser and never sent anywhere. To fetch the headers a live site sends, use the HTTP Headers Checker.

Frequently asked questions

Is 'unsafe-inline' in script-src safe?

No. With 'unsafe-inline', any script an attacker manages to inject into the page runs, which is exactly what a Content-Security-Policy exists to stop. Use a nonce or hash for each inline script instead. Once a nonce or hash is present, modern browsers ignore 'unsafe-inline', so keeping it as a fallback for old browsers is harmless.

What does 'strict-dynamic' do in a CSP?

The 'strict-dynamic' keyword lets a script that was trusted through a nonce or hash load further scripts, while host allowlists and https: are ignored by browsers that support it. Combined with a nonce, it gives a policy that is both strict and easy to deploy. Without any nonce or hash, it blocks every script.

Why should object-src be 'none'?

Plugins loaded with object or embed tags can run script outside the rules of script-src, and old Flash files on allowed hosts were a common bypass. Few sites still need plugins, so object-src 'none' removes that whole route. If object-src is missing, default-src applies, which is often not 'none'.

Why is my CSP host allowlist considered bypassable?

Popular script hosts, such as large CDNs and some Google domains, serve JSONP endpoints or old AngularJS versions. An attacker who can inject markup can load those allowed files to run their own code. Google's 2016 study found 94.7% of real allowlist policies bypassable this way; nonces with 'strict-dynamic' avoid the problem.

What happens when a CSP directive is misspelt?

The browser ignores the directive and logs a console warning, but the rest of the policy still applies, so the page loses that protection silently. A typo such as frame-ancestor instead of frame-ancestors leaves the page open to clickjacking. This tool lists unknown directives and suggests the name you probably meant.

Can a Content-Security-Policy be set in a meta tag?

Yes, with a meta http-equiv tag in the page head, but three directives do not work there: frame-ancestors, report-uri and sandbox. Policies in a meta tag also apply only to content after the tag. Sending the policy as an HTTP response header is the reliable choice; the meta tag suits static hosting without header control.

Sources

  • W3C, Content Security Policy Level 3Parsing, directives, source expressions, fallback and meta-tag limits
  • Weichselbaum et al., CSP Is Dead, Long Live CSP! (ACM CCS 2016, Google Research)Why allowlists are bypassable, and the strict nonce policy
  • MDN Web Docs, Content-Security-PolicyObsolete directives and browser support

Last verified 16 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about CSP Evaluator and anybody who knows can answer. No account needed.

Common uses

  • CSP ValidatorFind typos, missing semicolons and invalid sources in a Content-Security-Policy

Same job, other tools: Check IMEI Number Validity – Test a list of IMEIs for a correct Luhn check digit, one per line, and copy the results.

On the related tools: JWT Decoder – Paste a token to read its header, payload and expiry · Passphrase Generator – Three to ten random words you can actually remember.

Related tools

All developer tools
JWT Decoder, Verifier & EncoderDecode any JWT, verify its signature, and sign new tokens, all in your browserPassword GeneratorStrong random passwords and memorable passphrases, generated on your devicePassword Strength CheckerHow long your password would survive an attack, and exactly what makes it weakHMAC GeneratorHMAC-SHA1, SHA-256, SHA-384 and SHA-512 of text or a file, and signature checksBcrypt Hash and VerifyHash a password with bcrypt at cost 4 to 14, or check a password against a hashTOTP Generator and TesterLive authenticator codes from a secret, a QR code for your app, and a code testerCertificate DecoderRead an SSL certificate, CSR or public key: names, dates, key size and fingerprintsIMEI CheckerCheck an IMEI number’s check digit, see its TAC and serial, and look up the phone model
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
EnglishالعربيةবাংলাDeutschEspañolFrançaisPolskiPortuguêsРусский
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)