CSP Header Generator

Webmaster Tools 57 uses

Free online CSP header generator: tick the allowed sources for the main directives to build a Content-Security-Policy header you can copy. Defends against XSS and content injection; all generated locally.

Directive
Allowed sources (multiple)
default-src default resources
script-src scripts
style-src styles
img-src images
connect-src connections
Online Content-Security-Policy (CSP) header generator: tick the allowed sources for the default-src, script-src, style-src, img-src and connect-src directives to instantly build a Content-Security-Policy header you can copy. Used to defend against XSS and content injection; all generated locally.

Share this result

Create a short link so you can reopen or download the result on other devices.