piko

Content Security Policy Generator

Create a basic CSP response header with explicit source lists for scripts, styles, and images.

Runs on your device. Nothing you add is uploaded.

Report-only header
HTTP header
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self'; img-src 'self' data:; connect-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'none'

How to use Content Security Policy Generator

  1. Replace the example with your own page details.
  2. Review the generated output or preview.
  3. Copy or download the result you need.

Questions

A report-only header allows you to inspect violations before enforcing the policy. Resources outside the configured sources can produce violations.

How this works

Builds or reads markup locally with format-specific validation and escaping.

Everything happens in this browser tab. What you type or add stays on your device, and the page has no tracking. Your last settings are kept in this browser so the tool opens the way you left it. Privacy

Related tools

More in Web & SEO