All Tools › Security & Privacy › Security Headers Generator

Security Headers Generator

Build hardened HTTP security headers with HSTS, CSP and more, copy for Nginx, Apache or Cloudflare.

Strict-Transport-Security (HSTS)

Content-Security-Policy

Using 'unsafe-inline' weakens CSP significantly, avoid it in production.

Other Security Headers

Generate HTTP security headers

A handful of HTTP response headers meaningfully harden a website — telling browsers to enforce HTTPS, block clickjacking, and restrict what content can load. Remembering the exact syntax is the hard part. This generator produces the common security headers from the options you choose, ready to add to your server or CDN configuration.

How to use it

  1. Choose the protections you want.
  2. Copy the generated headers.
  3. Add them to your server, framework, or CDN config.

Headers worth setting

Questions people ask

Could these break my site? A strict Content-Security-Policy can block legitimate resources, so test in a staging environment and tighten gradually.

Is my input uploaded? No — the headers are generated in your browser.