A typo in a directive name does not fail. It disappears.
This is the finding this tool exists for. Write scipt-src instead of script-src and no browser complains, no console warning appears, and the directive simply does not exist. The policy looks restrictive in your config file and restricts nothing.
Every directive name here is checked against the current CSP Level 3 set, and an unrecognised one is reported with the closest known name. An unquoted keyword is the same class of defect: script-src self does not mean 'self' — it permits a host literally named self, and nothing else. That one is an error rather than a warning, because it silently makes a policy far stricter than intended and the symptom is a blank page.
Four directives have no default-src fallback at all
base-uri, form-action, frame-ancestors and sandbox are not covered by default-src. A policy of default-src 'none' looks maximally strict and still permits an injected <base href> to redirect every relative script URL on the page.
This is the check most often missing from other analysers, and it is the one with the most direct consequence, so it is reported whenever any of the four is absent — including under a strict default-src, which is exactly when it is easiest to assume you are covered.
'none' beside another source is ignored, not invalid
script-src 'none' https://cdn.example.com does not mean "nothing". CSP3 says a source list containing only 'none' matches nothing; when 'none' appears alongside other sources it simply has no effect, and the other sources match normally. So that directive permits scripts from the CDN.
This tool reports it as a warning naming the sources that actually apply, and the effective-policy analysis carries on over them. Treating the directive as empty would cascade into a false claim about the whole policy.
A nonce is measured in bytes, and length is not entropy
CSP says a nonce should carry at least 128 bits before encoding — that is 16 bytes, and standard base64 encodes 16 bytes as 24 characters. Counting characters as if they were bytes under-warns by a third, so the check here works in bytes and reports the byte count.
Sometimes it cannot, and says so instead of guessing. A browser never decodes a nonce — it compares the string — so CSP's grammar is deliberately loose: it puts +, /, - and _ in one character class and allows padding after any length. A body like a+b-c_d/ is therefore perfectly valid CSP while being the base64 of nothing at all, and its size is reported as undetermined rather than computed from its length. That is a statement about what can be known, not a complaint about the value.
What the check never does is claim anything about randomness. Sixteen zero bytes encode to a perfectly long nonce with no entropy whatsoever, so a long nonce gets no finding at all rather than a reassuring one. A separate, advisory check flags a body that looks like a placeholder or a fixed value — because a nonce that is the same on every response is not a nonce.
A hash has one shape that can match, and it includes the padding
CSP does not decode the digest you write either. It hashes the script, base64-encodes the result, rewrites - to + and _ to / in your policy's value, and compares the two strings. Nothing adds or removes padding on either side.
So 'sha256-' followed by 43 characters and no = is valid CSP, is the right number of bytes, and can never match — a browser's string is 44 characters and ends in =. That gets a warning here rather than silence, because a hash that cannot match is a script that will not run.
The shapes that can match: SHA-256 44 characters ending in one =; SHA-384 64 characters with no padding; SHA-512 88 characters ending in two =. Base64url characters are fine in all three, because CSP normalises them.
The length is not quite the whole rule. A 32-byte digest ends mid-group, so its last base64 character carries four data bits and two bits that an encoder always leaves zero — which means a SHA-256 value must end in one of the sixteen characters whose position is a multiple of four. SHA-512 ends in a smaller group still and needs four zero bits. A value of exactly the right length that fails this is a string no encoder produces, so it also gets a warning. (SHA-384 is a whole number of groups and has no such constraint.)
What Generate gives you, and what it deliberately does not
Generate emits a starting point from one of four presets. The output pane holds only the policy — no comments, no explanation — because a CSP header value has no comment syntax and anything else in that pane ends up pasted into a server config. The caveats are in the findings, and they are not suppressible.
The nonce placeholder is the fixed string REPLACE_THIS_PER_RESPONSE_NONCE, and the hash one is PUT_THE_BASE64_SHA256_OF_THE_SCRIPT_IN_HERE=. Both are valid CSP syntax — a nonce body may only contain letters, digits, +, /, - and _, so a brace or an angle bracket would make the policy itself malformed — and both are obviously not usable values. The hash placeholder is in the matching-safe shape too — right length, right padding, and zero pad bits in its final character — so swapping its body for a real digest is the only edit needed.
This tool never generates a nonce or a hash. Neither placeholder is derived from randomness of any kind. A nonce minted in a browser tab and pasted into a config is a fixed value, which is strictly worse than no nonce because it looks like protection. Replace it server-side, per response, from a cryptographically secure generator.
Deploy with Content-Security-Policy-Report-Only first, read the violation reports, and only then enforce.
Frequently asked questions
Is my site secure if this report is clean?
No, and the report says so on every run. A Content Security Policy is defence in depth: it reduces what an injected script can do, it does not remove the injection. This tool describes what the policy you pasted enforces. There is no grade here, deliberately — a grade is the part people quote and the part least connected to whether an application is safe.
Why is my second script-src reported as ignored?
Because within one policy a repeated directive name is resolved by taking the first occurrence; the later one is ignored entirely. Editing it changes nothing, which is why it is reported rather than merged.
Is a report-uri in my policy contacted?
Never. No endpoint is resolved, no hash is fetched, and this page makes no network request of any kind while analysing.
What happened to navigate-to?
It appeared in earlier CSP Level 3 drafts and is not in the current directive set, so current browsers ignore it. It is reported as historical rather than as a typo, because someone who wrote it was reading a real specification at the time and does not need to go hunting for a spelling mistake.