Canonical: https://toolipedia.app/security-headers-generator

# Security Headers Generator

Build a set of security response headers (HSTS, nosniff, X-Frame-Options, Referrer-Policy, Permissions-Policy, CSP) and get ready Nginx, Apache or Netlify configuration.

Breadcrumbs: Toolipedia > Network and website tools > Security Headers Generator

## About Security Headers Generator

Security headers tell browsers how to treat your site, but the syntax differs between servers. This generator builds a set from plain choices: Strict-Transport-Security with max-age, includeSubDomains and preload, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, a starter Content-Security-Policy or your own, and the Cross-Origin policies. It checks the preload rules, then writes ready configuration for Nginx, for Apache with mod_headers, or for a Netlify or Cloudflare Pages _headers file. Test on a staging site before going live.

## How to use Security Headers Generator
1. Choose your server type and switch each header on or off, adjusting HSTS, the frame option, referrer policy and policy presets.
2. Pick a Content-Security-Policy starter or type your own, and read the warnings about preload and inline content.
3. Copy the generated block into your server configuration or _headers file, deploy to staging and test the site before production.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- security headers generator
- hsts header generator
- content security policy generator
- nginx security headers
- x-frame-options generator

## Frequently asked questions

### Is it safe to turn on HSTS preload straight away?

No. Preload needs includeSubDomains and at least a year of max-age, and it is slow to undo. Start with a short max-age, make sure every subdomain works over HTTPS, then raise it.

### Will a Content-Security-Policy break my site?

A strict policy blocks inline scripts and outside sources, so it can. Test with the Report-Only form first and add the sources your pages truly need before enforcing it.

### Why do my Nginx headers disappear in some locations?

Nginx replaces inherited add_header lines when a location block defines its own. Repeat the security headers there, or put them in an include file used by every block.

### Is Security Headers Generator free?

Yes. Security Headers Generator on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Security Headers Generator:
- [Content Security Policy generator](https://toolipedia.app/csp-generator)
- [HTTP headers checker](https://toolipedia.app/http-headers)
- [Wildcard Mask Calculator](https://toolipedia.app/wildcard-mask-calculator)
- [Website response time](https://toolipedia.app/response-time)
- [CORS Headers Generator](https://toolipedia.app/cors-headers-generator)
