Home/Security & Business/Permissions-Policy Generator

Permissions-Policy Generator

Switch off the browser features your site never uses — camera, microphone, location, sensors and more — across your pages and every frame you embed.

Free Browser-based No signup Copy-ready
Generator Settings
Space-separated. Used by any feature set to “Self + trusted”. Origins are quoted automatically — a common source of silent failure.
Features
Anything you do not use should be blocked. A feature you never call costs nothing to switch off and removes it from every embedded frame too.
Generated Header ready
Permissions-Policy

      
Unrecognised feature names are ignored silently by browsers. That is deliberate forward-compatibility, but it also means a typo does nothing and looks exactly like a working policy.

How it works

1

Choose a preset

Lockdown for a content site, or set each of the 27 features yourself.

2

Name trusted origins

Quoting is handled for you — the usual reason a hand-written policy fails.

3

Ship the header

Server config for six platforms, plus the matching iframe allow attribute.

What this header is actually for

Permissions-Policy does not ask the user anything. It decides which powerful browser APIs are available at all on your pages — and, crucially, inside every iframe you embed. A feature switched off here cannot be requested, so the permission prompt never appears.

The third-party frame problem

Without this header, an embedded advert, chat widget or analytics frame inherits the ability to ask for the camera, the microphone or precise location. The prompt says your domain. Users blame you, and you may never know it happened. Blocking unused features removes the possibility entirely.

Defaults are not “off”

A feature you omit is not blocked — it falls back to the browser default, which for most features is self. Locking something down requires naming it explicitly, which is why the generated header lists all 27.

Three grammars, one concept

The current header separates features with commas and wraps allowlists in parentheses. The obsolete Feature-Policy used semicolons and quoted keywords. The iframe allow attribute uses semicolons and no parentheses. Examples found online are frequently in the wrong grammar for the header they are pasted into.

Quoting is not optional

self is a bare keyword; origins are double-quoted. (self "https://a.com") is correct, (self https://a.com) is not — and the invalid form can invalidate the whole entry.

Browsers silently ignore feature names they do not recognise. That keeps old headers working as the spec grows, but it also means a typo produces no error, no console warning and no effect — a policy that looks correct and does nothing.

Frequently Asked Questions

View all FAQs
What is the Permissions-Policy header?
A response header that controls which browser features — camera, microphone, geolocation, sensors, payment and more — may be used by your pages and by any frames they embed. It replaced the older Feature-Policy header, which used a different syntax.
Does it replace the permission prompt?
It comes before it. If a feature is blocked by policy the API is unavailable, so the prompt never appears. If a feature is allowed, the browser still asks the user in the normal way — the header grants the possibility, not the permission.
Why is my policy being ignored?
Usually one of three things: unquoted origins in the allowlist, semicolons instead of commas (that is Feature-Policy syntax), or a misspelled feature name. Browsers ignore unknown features silently, so a typo looks identical to a working policy.
Do I need to list features I do not use?
Yes, if you want them blocked. An unlisted feature falls back to the browser default, which for most features is self rather than off. Naming them all is the point of a lockdown policy.
What is the difference from the iframe allow attribute?
The header sets what your own document may do. The allow attribute delegates some of that downwards to a specific frame. An iframe can never receive a permission the parent page does not itself hold.
Should I still send Feature-Policy?
No. Every current browser supports Permissions-Policy, and serving both creates two sources of truth with different grammars. Remove the old header.

Permissions-Policy: switching off browser features you never use

This Permissions-Policy generator builds the header that disables camera, microphone, geolocation, sensors and 20+ other browser features — across your own pages and every iframe you embed. Below: the syntax that trips people up, and why an unlisted feature is not a blocked one.

What the header does

Permissions-Policy declares which powerful browser APIs are available in a document. It is not a permission prompt and it does not ask the user anything — it decides whether the question can be asked at all.

The reason it matters more than it first appears is iframes. By default, an embedded third-party frame inherits your document's ability to request the camera, the microphone or precise location. The resulting prompt names your domain, because permissions are granted per top-level site. An advert or chat widget can therefore trigger a permission request that users will attribute to you.

Switching off features you never use removes that possibility completely, at the cost of one header.

The syntax, and the three ways to get it wrong

FormMeaningCorrect?
camera=()Blocked everywhere.Yes
camera=(self)Your origin only.Yes — self is unquoted
camera=*Every origin, including all frames.Yes, but rarely wise
camera=(self "https://a.com")Your origin plus a named one.Yes — origins are quoted
camera=(self https://a.com)Unquoted origin.No — invalid
camera 'none'; mic 'none'Old Feature-Policy grammar.No — wrong header
camera=(), mic=()Comma-separated features.Yes — commas, not semicolons
The quoting asymmetry catches nearly everyone. self is a bare keyword and must not be quoted; origins are strings and must be. Get it backwards and the entry is invalid — with no error message anywhere.

An unlisted feature is not blocked

This is the misconception that makes a policy weaker than intended. Omitting a feature does not disable it; it falls back to the browser default, and for most features that default is self — allowed on your own origin.

So a header naming three features has locked down three features and left the other two dozen at their defaults. If the goal is "this site never uses hardware APIs", every one of them has to be named. That is why the generated header is long: completeness is the entire point.

The compensating detail is that browsers ignore feature names they do not recognise. Listing a feature your target browser has never heard of is harmless — which makes an exhaustive list safe to ship.

The same forgiving behaviour hides mistakes. A misspelled feature is ignored exactly as silently as an unsupported one: no console warning, no error, no effect. Copy names from a reference rather than typing them.

What to block on an ordinary site

Always block

Camera, microphone, screen capture, geolocation, USB, serial, HID, Bluetooth, MIDI, idle detection. A blog or brochure site uses none of them, and each is a meaningful capability.

Usually block

Accelerometer, gyroscope, magnetometer, ambient light, local fonts, Topics API. Sensors are a fingerprinting surface as much as a feature.

Often keep

Fullscreen and picture-in-picture, for video. Web Share, for mobile sharing. Autoplay, if you host video.

Keep if relevant

Payment Request and WebAuthn on a checkout or login flow — restricted to self, never *.

Delegating to an iframe

Blocking at the top level blocks everywhere. To let one specific embed use a feature, allow it in the header and then delegate it to that frame with the allow attribute:

<iframe src="https://player.example.com" allow="fullscreen; picture-in-picture">

Two rules govern this and both are absolute. A frame can never be granted more than the parent document holds — delegation narrows, it never widens. And the attribute uses its own grammar: semicolon-separated, no parentheses, with 'self' quoted, unlike in the header.

Delegate the minimum. A video embed needs fullscreen and perhaps picture-in-picture; it does not need camera. The allow attribute is the right place to be specific, because it applies to exactly one frame rather than the whole document.

Feature-Policy is obsolete

Feature-Policy was the original header and used a different grammar entirely: semicolon-separated, with quoted keywords such as geolocation 'self'. It has been superseded by Permissions-Policy, which every current browser supports.

Do not send both. Two headers expressing overlapping rules in incompatible grammars is a reliable source of confusion during an incident, and the old one buys you nothing on any browser still receiving security updates.

Most stale examples online are in the old syntax. If a snippet uses semicolons between features and quotes around self, it is for the wrong header.

Related searches

permissions policy generatorpermissions-policy headerfeature policy headerdisable geolocation browserblock camera microphone headeriframe allow attributepermissions policy syntaxpermissions policy examplebrowser feature lockdownpermissions policy self originsecurity headers generatorpermissions policy report-only