Permissions-Policy header generator with iframe allow output
This tool builds a Permissions-Policy header from a feature and allowlist per line, checked against MDN's list of 51 directives with Chromium support from browser-compat-data. It also writes the iframe allow attribute, the legacy Feature-Policy form and Next.js, nginx and Apache snippets.
Updated
Features in the policy
15
13 switched off, 0 open to every origin, 2 limited
Header
Permissions-Policy: camera=(), microphone=(), geolocation=(), display-capture=(), usb=(), serial=(), hid=(), bluetooth=(), midi=(), accelerometer=(), gyroscope=(), magnetometer=(), browsing-topics=(), fullscreen=(self), payment=(self "https://pay.example.com")
- Header value
- camera=(), microphone=(), geolocation=(), display-capture=(), usb=(), serial=(), hid=(), bluetooth=(), midi=(), accelerometer=(), gyroscope=(), magnetometer=(), browsing-topics=(), fullscreen=(self), payment=(self "https://pay.example.com")
- Header name
- Permissions-PolicyReplaces the old Feature-Policy header.
| Feature | Allowlist | Chromium support (BCD) |
|---|---|---|
| camera | none | 88+ |
| microphone | none | 88+ |
| geolocation | none | 88+ |
| display-capture | none | 94+ |
| usb | none | 88+ |
| serial | none | 89+ |
| hid | none | 89+ |
| bluetooth | none | 104+ |
| midi | none | 88+ |
| accelerometer | none | 88+ |
| gyroscope | none | 88+ |
| magnetometer | none | behind a flag |
| browsing-topics | none | 115+ (deprecated) |
| fullscreen | self | 88+ |
| payment | self https://pay.example.com | 88+ |
- The header lists a structured dictionary: self is bare, origins are in double quotes, and () means disabled everywhere. The iframe allow attribute keeps the older syntax with 'self' and 'none' in single quotes.
- magnetometer: MDN's browser-compat-data has no shipping Chromium support for this directive (behind a flag), so the line currently does nothing in stable browsers.
- browsing-topics: marked deprecated in browser-compat-data. Keep the line only if you still need it.
- Support: MDN labels the header "limited availability". Browser-compat-data (2026-11-02) records the Permissions-Policy header in Chrome and Edge 85+ and no support in Firefox or Safari. The iframe allow attribute works in Firefox 74+ and Safari 11.1+.
How does a Permissions-Policy work?
Permissions-Policy tells the browser which powerful features (camera, microphone, geolocation, fullscreen, payment and others) your page and the frames inside it may use. Each feature has an allowlist: () or none switches it off everywhere, * allows every origin, self allows your own origin, and a list of origins allows those. Without a header, each feature uses its own default allowlist, which is either * or self.
Frames inherit the page's policy. A parent's header sets the superset of origins that can use a feature, and an iframe's allow attribute can grant it only to origins inside that set. Once a parent disables a feature for a child frame, the child and its descendants can't switch it back on. The policy does not replace the permission prompt: it decides who is allowed to ask.
The header was called Feature-Policy before. The name and the header syntax changed (the new one is a structured dictionary with bare self and quoted origins), but the iframe allow attribute kept the old syntax with 'self' and 'none' in single quotes. This tool writes both, and the table below lists all 51 directives MDN documents with Chromium support from browser-compat-data.
Permissions-Policy: camera=(), geolocation=(self "https://maps.example.com"), fullscreen=*
Which features can a Permissions-Policy control, and which browsers honour them?
| Feature | What it controls | Chrome and Edge | Firefox and Safari |
|---|---|---|---|
| accelerometer | Device acceleration via the Accelerometer interface | 88+ | no header support recorded |
| ambient-light-sensor | Ambient light data via AmbientLightSensor | behind a flag | no header support recorded |
| aria-notify | Screen reader announcements via ariaNotify() | 141+ | no header support recorded |
| attribution-reporting | The Attribution Reporting API | 117+ (deprecated) | no header support recorded |
| autoplay | Autoplaying media through HTMLMediaElement | 88+ | no header support recorded |
| bluetooth | The Web Bluetooth API | 104+ | no header support recorded |
| browsing-topics | The Topics API | 115+ (deprecated) | no header support recorded |
| camera | Video input devices | 88+ | no header support recorded |
| captured-surface-control | The Captured Surface Control API | 136+ | no header support recorded |
| ch-ua-high-entropy-values | NavigatorUAData.getHighEntropyValues() | 144+ | no header support recorded |
| compute-pressure | The Compute Pressure API | 125+ | no header support recorded |
| cross-origin-isolated | Whether the document can be cross-origin isolated | 88+ | no header support recorded |
| deferred-fetch | The top-level origin's fetchLater() quota | 135+ | no header support recorded |
| deferred-fetch-minimal | The shared cross-origin subframe fetchLater() quota | 135+ | no header support recorded |
| display-capture | Screen capture with getDisplayMedia() | 94+ | no header support recorded |
| encrypted-media | The Encrypted Media Extensions API | 88+ | no header support recorded |
| fullscreen | Element.requestFullscreen() | 88+ | no header support recorded |
| gamepad | The Gamepad API | 103+ | no header support recorded |
| geolocation | The Geolocation interface | 88+ | no header support recorded |
| gyroscope | Device orientation via Gyroscope | 88+ | no header support recorded |
| hid | The WebHID API | 89+ | no header support recorded |
| identity-credentials-get | Federated Credential Management (FedCM) | 110+ | no header support recorded |
| idle-detection | The Idle Detection API | 94+ | no header support recorded |
| language-detector | Language detection in the Translator and Language Detector APIs | not listed in BCD | no header support recorded |
| language-model | The Prompt API | 148+ | no header support recorded |
| local-fonts | Window.queryLocalFonts() | 103+ | no header support recorded |
| local-network | Requests to local network addresses | 145+ | no header support recorded |
| local-network-access | Alias for local-network and loopback-network | 142+ | no header support recorded |
| loopback-network | Requests to loopback addresses | 145+ | no header support recorded |
| magnetometer | Device orientation via Magnetometer | behind a flag | no header support recorded |
| microphone | Audio input devices | 88+ | no header support recorded |
| midi | The Web MIDI API | 88+ | no header support recorded |
| on-device-speech-recognition | On-device speech recognition in the Web Speech API | 142+ | no header support recorded |
| otp-credentials | WebOTP one-time password requests | 93+ | no header support recorded |
| payment | The Payment Request API | 88+ | no header support recorded |
| picture-in-picture | Picture-in-Picture video | 88+ | no header support recorded |
| private-state-token-issuance | Private state token token-request operations | 117+ | no header support recorded |
| private-state-token-redemption | Private state token redemption operations | 117+ | no header support recorded |
| publickey-credentials-create | Creating Web Authentication credentials | 88+ | no header support recorded |
| publickey-credentials-get | Reading Web Authentication credentials | 88+ | no header support recorded |
| screen-wake-lock | The Screen Wake Lock API | 88+ | no header support recorded |
| serial | The Web Serial API | 89+ | no header support recorded |
| speaker-selection | Listing and selecting speakers (Audio Output Devices API) | not listed in BCD | no header support recorded |
| storage-access | The Storage Access API for third-party iframes | 113+ | no header support recorded |
| summarizer | The Summarizer API | 138+ | no header support recorded |
| translator | Translation in the Translator and Language Detector APIs | not listed in BCD | no header support recorded |
| unload | Running unload event handlers | 115+ | no header support recorded |
| usb | The WebUSB API | 88+ | no header support recorded |
| web-share | Navigator.share() | 88+ | no header support recorded |
| window-management | The Window Management API | 100+ | no header support recorded |
| xr-spatial-tracking | The WebXR Device API | 88+ | no header support recorded |
How to set a Permissions-Policy
- 1Choose a starting pointStart from the lockdown list to switch off hardware and tracking APIs your site doesn't use, or start empty.
- 2List the features you useWrite one feature per line, such as geolocation: self or payment: self https://pay.example.com. Origins must be full origins with no path.
- 3Pick the outputCopy the header, the Next.js headers() entry, the nginx or Apache line, or the iframe allow attribute for an embed.
- 4Test in Chrome or EdgeOpen DevTools and load the page. A blocked feature logs a policy violation when your code calls it. Firefox and Safari ignore the header, so don't rely on it as your only control.
Frequently asked questions
What is the difference between Permissions-Policy and Feature-Policy?
Why does self have no quotes in the header but quotes in the iframe allow attribute?
Does the header work in Firefox and Safari?
What does allow="camera" with no value mean?
Can I use wildcards in origins?
Does disabling a feature remove the browser's permission prompt for my own site?
Sources
- MDN: Permissions-Policy header (directive list and syntax) (checked 11 Nov 2026)
- MDN: Permissions Policy guide (allow attribute, inheritance, Feature-Policy rename) (checked 11 Nov 2026)
- W3C Web Application Security WG: Permissions Policy (editor's draft) (checked 11 Nov 2026)
- MDN browser-compat-data 8.1.8 (2026-11-02): http.headers.Permissions-Policy and Feature-Policy (checked 11 Nov 2026)
- Next.js: headers in next.config.js (Permissions-Policy example) (checked 11 Nov 2026)
- nginx: ngx_http_headers_module (add_header) (checked 11 Nov 2026)
- Apache: mod_headers (Header always) (checked 11 Nov 2026)
Need a custom dev tool for your team?
We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.
Built by CountryDevs · No signup · No ads · We count visits, never what you enter