HTTP & Security Header Tools

Content Security Policy Generator

Content Security Policy Generator builds a Content-Security-Policy header in your browser from presets and per-directive sources.

Client-sideRuns entirely in your browser — your data never leaves your device.

Content Security Policy Generator is a free HTTP & Security Header Tools utility that runs entirely in your browser — nothing you enter is uploaded.

Content-Security-Policy

How to use Content Security Policy Generator

  1. Drop your text into the field at the top of Content Security Policy Generator.
  2. Tune the Preset, script-src (optional), style-src (optional) controls before you generate.
  3. Content Security Policy Generator updates the output automatically as you type.
  4. Use Copy to keep or reuse the result.

About this tool

Everything Content Security Policy Generator does happens on your own device. Content Security Policy Generator handles your input locally and returns the result instantly, with no sign-up.

It is designed to do one job well and stay out of your way. Nothing you enter is uploaded, and it keeps working offline once the page has loaded.

Frequently asked questions

What does Content Security Policy Generator do?

Use Content Security Policy Generator to generate your input without installing anything using the Preset, script-src (optional) controls; everything happens client-side.

Is Content Security Policy Generator free to use?

Yes — Content Security Policy Generator is completely free, with no usage limits.

Where is my data processed by Content Security Policy Generator?

Entirely in your browser — Content Security Policy Generator keeps your data on your own machine and sends nothing anywhere.

Does Content Security Policy Generator work offline?

Once the page has loaded, Content Security Policy Generator keeps working with no network connection.

Related CSP & security header tools