CSP Header Generator

Content-Security-Policy generator with a visual editor for default-src, script-src and other directives, producing a ready-to-deploy CSP header. Free and instant, so you can harden your site against XSS.

default-src
script-src
style-src
img-src
font-src
connect-src
object-src
frame-ancestors
Embed

Embed this tool on your site

Powered by Patrache Studio DevTools
Last updated: 2026 · Free online tool

What is CSP Header Generator?

Content-Security-Policy generator with a visual editor for default-src, script-src and other directives, producing a ready-to-deploy CSP header. Free and instant, so you can harden your site against XSS.

How to Use

  1. 1
    Input— Enter the required data.
  2. 2
    Check Results— Review the processing results.
  3. 3
    Copy— Copy the results for use.

Related Tools

Frequently Asked Questions

It is a free online tool to visually edit and generate Content-Security-Policy headers.

Yes, it is completely free and all processing is done in the browser.

No. All processing is done in the browser.

Yes, static data-based tools can be used offline.

Yes, the responsive design works properly on mobile devices.

This site uses cookies for better experience and advertising. Learn more

Please allow ads on this site

To use these tools, allow ads on this site. Advertising keeps this service free.

Open your ad blocker, turn off blocking for this site, then check again.