Skip to content
Web & InternetLocal · Stays on device

Content Security Policy Builder

Compose a Content-Security-Policy with explanations and a weakness review, and build a Permissions-Policy header.

  • Works on desktop and phone
  • Free to use
  • No sign-up or watermark
content-security-policy-builderOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10

Not yet professionally reviewed. This tool’s formulas and wording have not been checked by a qualified professional. Use the results as an estimate and verify anything important.

A configuration aid, not a security audit. A wrong policy can break your site or leave gaps; deploy in report-only mode first and test in your target browsers.

About this tool

Start from a strict policy or paste an existing one, then turn directives on and edit their sources, with a one-line explanation of each. The review flags 'unsafe-inline' without nonces or hashes, 'unsafe-eval', wildcard or scheme-only script sources, data: scripts, plain http sources, missing object-src, base-uri, frame-ancestors and form-action, duplicate and unknown directives. Copy the header (enforcing or report-only) or a <meta> version, which automatically drops directives that only work as headers.

The Permissions-Policy view (?header=permissions) sets each browser feature — camera, microphone, geolocation, payment, Topics and more — to disabled, this site only, listed origins or all, and writes the header. Feature names follow the W3C list. Everything runs in your browser: nothing you paste or type is uploaded, and no website, DNS server or API is contacted.

  1. Input

    Your code or text

    Pasted or opened from a file

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelineInstant, in-browser

How to use it

  1. 1

    Choose or paste a starting policy.

  2. 2

    Adjust directives until the review is clean.

  3. 3

    Copy the header and roll it out in report-only mode first.

  4. 4

    Switch to Permissions-Policy to restrict browser features.

Zero-upload architecture

How to use Content Security Policy Builder for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open Content Security Policy Builder

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Adjust directives until the review is clean.

  3. 3

    Get your result

    Switch to Permissions-Policy to restrict browser features.

All 26 web tools
  • Local

    HTTP Header Inspector

    Paste response headers to get each one explained and checked: HSTS, CSP, cookies, caching, CORS and information leaks.

    Open tool
  • Local

    Web CORS Configuration Helper

    Build correct CORS headers for your API from allowed origins, methods and headers, with nginx and Express examples.

    Open tool
  • Local

    HTML Preview Sandbox

    Preview HTML and CSS safely in an isolated, offline sandbox at phone, tablet and desktop widths.

    Open tool
  • Local

    UTM Link Builder

    Build campaign-tagged links with UTM parameters, one at a time or in bulk, with tidy formatting.

    Open tool