DevTools Logo

CSP Builder & Validator

CSP Builder & Validator

Build a Content-Security-Policy visually, or audit an existing header

Policy Mode

Log violations without blocking

Directives

default-src
1
script-src
1
style-src
1
img-src
2
font-src
1
connect-src
1
media-src
1
object-src
1
frame-src
1
frame-ancestors
1
base-uri
1
form-action
1
manifest-src
1
worker-src
1
prefetch-src
1

default-src

Default policy for all content types

'self'

    About this tool

    Build a Content-Security-Policy visually or audit an existing header for unsafe-inline, wildcards and missing directives. Get a risk score and fixes. Free, in-browser. CSP Builder & Validator runs in the browser on DevTools. There is no signup, and your input stays on this device unless the tool explicitly performs a live network lookup.

    What this tool does not do

    • CSP Builder & Validator is a free in-browser utility, not a hosted API. It does not keep server-side history and is not a substitute for production verification in your own stack.

    How do I use this tool?

    1. How do I use CSP Builder & Validator?

      Open CSP Builder & Validator, enter or paste your input, and copy the result. The page works without an account.