Security Headers Generator (CSP, HSTS)
Generate HTTP security headers (Content-Security-Policy, HSTS, X-Frame-Options…) for Nginx, Apache, Next.js or Cloudflare.
Tool inputs stay in your browser · optional AI search sends your query
Good to know: Security headers tell browsers to block common attacks like clickjacking and script injection. Start CSP in “report only” mode, check the browser console for blocked items, then switch it on.
How to use it (step by step)
- 1Choose your options: “Where to add them”, “Content-Security-Policy”, “CSP mode”, “HSTS (force HTTPS)”, “Can other sites put you in an iframe?”.
- 2Press “Generate headers”.
- 3Copy the result with the Copy button. Press the button again for a fresh result.
Words to know
- Nginx / web server
- Software that receives visitors and sends them your pages or forwards them to your app.
- Security headers (CSP, HSTS)
- Instructions your server sends to browsers to block attacks. CSP limits where scripts can load from; HSTS forces HTTPS.
More in Developer
Mock Data Generator (JSON, CSV, SQL)Generate fake users, products, orders or posts for testing, as JSON, CSV or SQL INSERT statements.JWT Encoder (Create & Sign HS256)Create a signed JSON Web Token from a payload and secret (HS256/384/512) for testing APIs.Basic Auth Header Generator & DecoderMake the “Authorization: Basic …” header from a username and password, or decode an existing one.Chmod Calculator (Linux File Permissions)Turn permissions like 755 into rwxr-xr-x (and back) and see in plain words who can read, write and run a file.Nginx Config GeneratorCreate an Nginx server block for a reverse proxy (Node, Next.js), static site or single-page app, with HTTPS and gzip.Dockerfile GeneratorMake a production-ready Dockerfile for Node.js, Next.js, Python, Go or a static site, plus a .dockerignore.