CSP & HTTP security headers builder
Configure Content-Security-Policy (CSP), HSTS, X-Content-Type-Options, and Referrer-Policy directives and export ready-to-deploy HTTP headers, vercel.json, or Nginx snippets.
Content-Security-Policy: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:; connect-src 'self'; frame-ancestors 'none'; base-uri 'self'; object-src 'none' Referrer-Policy: strict-origin-when-cross-origin X-Content-Type-Options: nosniff Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Processing runs inside your browser without accounts or server uploads. Modular TypeScript domain logic tested locally.
Report a problem with this toolDefense-in-depth headers
Hardened defaults: Includes base-uri 'self', object-src 'none', and clickjacking protection via frame-ancestors.
Frequently asked questions
- Why does CSP include frame-ancestors instead of X-Frame-Options?
- CSP Level 2 frame-ancestors is the modern standard supporting fine-grained domain allowlists and supersedes legacy X-Frame-Options.
- Can I deploy this straight into Vercel or Nginx?
- Yes—toggle vercel.json or Nginx add_header output tabs and copy directly.
Related tools
Browse all toolsSecurity & generators
HMAC & Subresource Integrity (SRI)
Generate SHA-256/384/512 Subresource Integrity script hashes and compute HMAC-SHA256/512 signatures via browser Web Crypto.
Web & SEO
robots.txt & XML sitemap generator
Build crawlable robots.txt rules and valid sitemap.xml files from clean URL lists inside your browser.
Web & SEO
301/302 bulk redirect generator
Convert URL migration lists into ready-to-deploy HTTP redirect blocks for Vercel, Netlify _redirects, Nginx, and Apache.