Security Headers Builder (Permissions-Policy, Referrer-Policy, COOP, COEP, CORP)

Choose which browser features your site may use, how much referrer data leaks and whether pages are cross-origin isolated, then copy the server config.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Pick a preset

    Start from balanced, strict, isolated or embeddable widget.

  2. 2
    Set features

    Choose an allowlist for each Permissions-Policy feature.

  3. 3
    Set other headers

    Choose Referrer-Policy, COOP, COEP, CORP, framing and HSTS.

  4. 4
    Read the warnings

    Fix combinations that would break pop-ups, images or embeds.

  5. 5
    Choose your server

    Pick Nginx, Apache, IIS, Netlify, Cloudflare, Vercel, Express or Caddy.

  6. 6
    Copy or download

    Copy the config, or import live headers to adjust them.

About this tool

A handful of HTTP response headers decide a lot about how safely a browser treats your pages. Permissions-Policy switches off powerful features such as the camera, microphone, geolocation, payment and USB for your page and every iframe in it, so a compromised ad or widget cannot ask for them. Referrer-Policy controls how much of the current URL travels to other sites. Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy together make a page cross-origin isolated, which protects against Spectre-style data leaks and is required for SharedArrayBuffer and precise timers. Cross-Origin-Resource-Policy says who may load your files. X-Frame-Options or the CSP frame-ancestors directive stops clickjacking, and X-Content-Type-Options stops MIME sniffing. Each header has its own syntax, and Permissions-Policy in particular uses structured field values that are easy to get wrong. This builder writes them correctly and exports them for the server you use.

Permissions-Policy, feature by feature

The first tab lists 33 policy-controlled features with a short description. For each, choose not set, blocked everywhere, this site only, self plus listed origins, or everyone. The builder writes the structured syntax: camera=() blocks the feature, geolocation=(self "https://maps.example.com") allows your site and one partner, and fullscreen=* allows everyone. A filter box finds features quickly, and Block all gives a strict starting point. Remember that an iframe also needs a matching allow attribute for any feature you delegate to it.

Other headers

The second tab covers Referrer-Policy with a plain explanation of each of the eight values, COOP, COEP and CORP with their options, X-Frame-Options and CSP frame-ancestors for framing, nosniff, Strict-Transport-Security with includeSubDomains and preload, Origin-Agent-Cluster and X-Permitted-Cross-Domain-Policies. Four presets set sensible starting points: a balanced website, a strict site that uses no powerful features, a cross-origin isolated app and an embeddable widget.

Checks and output

Warnings explain combinations that bite in practice: COEP require-corp blocking third-party images, COOP same-origin breaking OAuth pop-ups, HSTS preload requirements, both X-Frame-Options and frame-ancestors being sent, and CORP same-origin blocking your own subdomains. The output tab writes the headers for Nginx, Apache .htaccess, IIS web.config, Netlify and Cloudflare Pages _headers, vercel.json, Express middleware, Caddy or plain header lines.

Import

Paste the response headers of a live page from DevTools or curl -I and the builder reads Permissions-Policy, Referrer-Policy, COOP, COEP, CORP, framing, nosniff and HSTS back into the controls, so you can adjust and re-export.

Limits

This tool builds headers; it does not scan a live site, and it adds only frame-ancestors from Content Security Policy, which deserves its own tool. Feature support differs between browsers; unknown features are ignored rather than breaking the page, but test any change on staging first. HSTS with preload is hard to undo, so enable it only when every subdomain serves HTTPS.

Worked example

A shop starts from the balanced preset. Eleven sensitive features, including camera, microphone, geolocation, usb and browsing-topics, start as blocked; payment is then switched to self plus https://pay.example-psp.com because the checkout iframe uses the Payment Request API. Referrer-Policy stays strict-origin-when-cross-origin. Switching COOP to same-origin raises a warning about the PayPal pop-up, so it is set back to same-origin-allow-popups. The Nginx output is 8 add_header lines with the always flag, including Strict-Transport-Security max-age=31536000; includeSubDomains, ready to paste into the server block.

Quick facts

Frequently asked questions

Is Permissions-Policy the same as Feature-Policy?

It replaces it. Feature-Policy used a different syntax and is deprecated; send Permissions-Policy, and only keep the old header if you must support very old browsers.

What does camera=() mean?

An empty allowlist: no origin, not even your own, may use the camera on this page or in its iframes.

Which Referrer-Policy should I use?

strict-origin-when-cross-origin is the browser default and suits most sites. Choose no-referrer or same-origin if your URLs can contain private data such as reset tokens.

Why would I need COOP and COEP?

Together, COOP same-origin and COEP require-corp or credentialless make the page cross-origin isolated, which unlocks SharedArrayBuffer for WebAssembly threads and audio worklets.

X-Frame-Options or frame-ancestors?

frame-ancestors is the modern, more flexible control and wins when both are present. Many sites send both for old browsers; keep them consistent.

Does the tool send anything to my server?

No. It only produces text for you to paste into your configuration.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages