Content Security Policy Generator
Build a Content Security Policy header by selecting directives and allowed sources. Code never leaves your device — formatting and validation run locally in your browser.
How to Use the Content Security Policy Generator
Similar Tools You Might Need
See allCSP Policy Validator
Validate Content Security Policy headers against W3C spec and common pitfalls. Code never leaves your device — formatting and validation run locally in your browser.
HTTP Header Analyzer
Analyze HTTP request and response headers — detect security headers, review formatting, and inspect value structure. Code never leaves your device — formatting and validation run locally in your browser.
HTTP Cache Header Generator
Generate Cache-Control directives with configurable max-age, scope, must-revalidate, and no-transform options. Code never leaves your device — formatting and validation run locally in your browser.
Markdown to HTML
Convert Markdown to clean HTML for CMS paste and publishing — headings, tables, code blocks. Turn README sources into pages — local conversion, free, no signup.
Add Text to Photo
Add one custom text caption onto a photo with color, size (10–300px slider), and X/Y position controls, composed on fixed social-size canvases — Instagram Post 1080×1080, Reel 1080×1920, YouTube Banner 2560×1440, Twitter Header 1500×500, or Custom. Exports PNG locally in your browser on Canvas; 3 free downloads a day.
Frequently Asked Questions
Directives builder?
Type one directive per line (or start from a Strict/Moderate/Permissive preset) — lines join into a single header value. No click-together picker.
Nonce or hash?
Not built in — include nonce/hash source expressions by typing them into the directive lines yourself.
Report-only first?
Recommended in practice — but the tool emits the header value only; serve it as Content-Security-Policy-Report-Only yourself to collect reports before enforcing.
Is my input uploaded anywhere when using Content Security Policy Generator?
No — generation runs locally in your browser, free with no signup.
Related Developer Tools
CSP Policy Validator
Validate Content Security Policy headers against W3C spec and common pitfalls. Code never leaves your device — formatting and validation run locally in your browser.
HTTP Security Checker
Run an HTTP security probe on a live URL — reachability, redirect chain, and visible response details, plus a reference checklist for HSTS, X-Frame-Options, and CSP.
Last updated October 2026