CSP Violation Report Parser and Grouper

Groups pasted CSP violation reports by directive and blocked source and suggests what to do for each.

Use the tool

Why this tool exists

When you roll out a Content-Security-Policy in report-only mode, the reports arrive as a pile of JSON. Reading them one by one hides the pattern.

Paste the reports, as one JSON per line, an array, or a Reporting API batch, and the tool counts them by effective directive and blocked origin. Browser-extension noise is dropped. Each group gets a hint: inline code needs a nonce or hash, eval needs a fix, an origin may need allowing. A report shows what was blocked, not what is safe.

How to use it

  1. Collect reports from your report endpoint or logs.
  2. Paste them as JSON, one per line or as an array.
  3. Read the groups, highest count first.
  4. Update the policy and watch the reports drop.

Frequently asked questions

Which formats are supported?

Legacy csp-report objects and Reporting API reports with type csp-violation.

Why are some reports ignored?

Reports blocked by browser extensions are noise and are filtered out.

Can I trust the hints?

They are generic. Review each source before you allow it.