About the Security Headers Generator
A few response headers block whole classes of attacks: HSTS forces HTTPS, X-Content-Type-Options stops MIME sniffing, frame-ancestors and X-Frame-Options prevent clickjacking, Referrer-Policy limits what leaks to other sites, Permissions-Policy turns off the camera, microphone and location APIs you do not use, and Cross-Origin-Opener-Policy isolates your pages from pop-ups on other sites.
Choose the headers and their strength and get them as raw headers or as nginx, Apache and Netlify/Cloudflare _headers snippets. HSTS preload is optional, with a warning about what it commits you to. For a Content-Security-Policy, use the dedicated CSP generator alongside this one.
How to use the Security Headers Generator
- Choose which headers to add and how strict they should be.
- Pick your server format.
- Add the snippet to your config and test your site.
Features
- HSTS with preload option
- Frame, MIME and referrer protection
- nginx, Apache and _headers
- Permissions-Policy and COOP/CORP
Supported formats
- Plain text
Frequently asked questions
Can these headers break my site?
X-Frame-Options DENY stops other sites — including your own on another domain — from embedding your pages, and HSTS forces HTTPS. Test on a staging site first.
Is my text sent anywhere?
No. Everything runs in your browser, so nothing you paste is uploaded or stored.