Local StudioSECURITY TOOLS

Content Security Policy Validator

Check Content Security Policy text and jump from findings to the exact directive or source.

  • Free
  • Works Offline
  • No Uploads
Works with:
  • Microsoft Edge
  • Google Chrome
  • Mozilla Firefox
  • Safari
Content Security Policy Validator report showing a missing quote, a duplicate script-src and a parsed default-src directive.
The built-in policy shows an unquoted keyword and an ignored duplicate, each with its source location.

How to Check a Content Security Policy

  1. Open the HTML, review Security Check, then select Continue.
  2. Paste one policy value or one named CSP header, choose a UTF-8 text file, or select Open Sample.
  3. Choose Enforcing HTTP Header, Report-Only HTTP Header, or HTML Meta Content, then select Validate Policy.
  4. Review the findings and parsed directives. Select Go to Source to locate a finding, or Edit Policy to change the input.
  5. Run Validate Policy again after correction. Browser enforcement is outside the static checks.

Review Syntax and Delivery Findings

  • Find unquoted keywords, malformed source expressions, and ignored duplicate directives.
  • Compare static findings for enforcing headers, report-only headers, and HTML meta content.
  • Inspect the exact directive and source locations in the editor.

Formats and Compatibility

InputPaste one serialized policy value, a Content-Security-Policy header, or a Content-Security-Policy-Report-Only header. You can also open one UTF-8 .txt or .csp file.
OutputView a static report grouped by severity, with parsed directives, source tokens, and links back to the editor.
BrowserA modern browser with local file support.
ScopeCheck one pasted policy value or named CSP header up to 65,536 characters, or open one UTF-8 text file up to 64 KiB. Runtime enforcement is unevaluated.
Operating Systems
  • Windows
  • macOS
  • Linux
  • ChromeOS

Local Processing Without Uploads

Use the browser-based CSP validator without uploading files.

Select Open Sample to see the workflow with the included example.

HTTP Header and HTML Meta Delivery

Enforcing and report-only headers have different browser roles. HTML meta delivery accepts an enforcing policy value and omits certain header directives.

Correct and Recheck the Policy

Use Go to Source to select the relevant text, make the correction, and validate again. The CSP syntax checker covers a defined subset of CSP Level 3. Test deployment separately.

Frequently Asked Questions

How do I use the CSP validator offline?

Use the CSP validator download, extract the ZIP, and open ContentSecurityPolicyValidator.html. The free CSP validator includes a synthetic sample.

Can I use the CSP validator in browser?

Yes. The local CSP validator checks the text on your device.

What delivery modes can I check?

Select an enforcing HTTP response header, a report-only response header, or the policy content of an HTML meta element.

What happens to duplicate directives?

The report preserves both occurrences and points to the earlier directive that takes precedence in that policy.

Does this check a deployed website?

The tool reads the text supplied to its local editor. It reports syntax, delivery notes, and selected broad settings. Runtime enforcement is unevaluated.

How can I fix a finding quickly?

Choose Go to Source to select the directive or token in the editor, make the change, then validate again.

Does this tool work offline on Windows, macOS, Linux, and ChromeOS?

Yes. Local Studio tools run offline on Windows, macOS, Linux, and ChromeOS. Download the tool ZIP, extract it, and open the included HTML file in a supported browser. Your files are processed on your device without uploads.

Which browsers can I use with this offline tool?

Use a current version of Google Chrome, Microsoft Edge, Mozilla Firefox, or Safari where that browser is available for your operating system. Chrome is built into ChromeOS, and Safari is available on macOS.