CSP violation explainer

Explain a Content-Security-Policy violation report and suggest a directive fix.

Runs in your browser. Your input is not uploaded.

Correctness last checked 2026-11-13. How we verify

What it does, how to use it, and questions

What it does

Browsers send Content-Security-Policy violation reports to a report-uri or via the Reporting API. The JSON names the blocked URI and the effective directive.

Paste a report to get a plain-English summary and a suggested allowlist change. Nothing is fetched.

How to use it

  1. Paste the report JSON.
  2. Read the summary and fields.
  3. Apply a deliberate policy change if you trust the blocked origin.

Things to watch for

  • A suggestion is not a recommendation to weaken CSP. Prefer hashes and nonces for inline script.
  • Report-only policies still emit reports; disposition tells you whether the load was blocked.

Questions

What is effective-directive?
The directive that blocked the load, such as script-src or img-src.
Why is blocked-uri inline?
An inline script or style ran without a nonce or hash.
Does this fetch the blocked URL?
No.
Which report shapes work?
Classic csp-report objects and Reporting API bodies with effectiveDirective / blockedURL.