Skip to content
LovelyTools
EN

Security Headers Generator

Generate HSTS, X-Frame-Options, Referrer-Policy and other HTTP security headers.

Processed locally on your device — nothing is uploaded.

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

  1. Choose which headers to add and how strict they should be.
  2. Pick your server format.
  3. 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.