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

Lines in the box below override the starter for the same feature.

One per line as feature: allowlist. The allowlist is none, *, self, or origins, and self can be combined with origins. In the iframe allow output you can also use src.

Optional. Adds ;report-to=name to each feature. Define the endpoint in a Reporting-Endpoints header.

Optional. Writes the Reporting-Endpoints header for the name above.

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.
Your policy, feature by feature
FeatureAllowlistChromium support (BCD)
cameranone88+
microphonenone88+
geolocationnone88+
display-capturenone94+
usbnone88+
serialnone89+
hidnone89+
bluetoothnone104+
midinone88+
accelerometernone88+
gyroscopenone88+
magnetometernonebehind a flag
browsing-topicsnone115+ (deprecated)
fullscreenself88+
paymentself https://pay.example.com88+
  • 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?

The 51 directives on MDN's Permissions-Policy page and the first Chromium version that supports each in the header (browser-compat-data 8.1.8, 2026-11-02; checked 2026-11-11)
FeatureWhat it controlsChrome and EdgeFirefox and Safari
accelerometerDevice acceleration via the Accelerometer interface88+no header support recorded
ambient-light-sensorAmbient light data via AmbientLightSensorbehind a flagno header support recorded
aria-notifyScreen reader announcements via ariaNotify()141+no header support recorded
attribution-reportingThe Attribution Reporting API117+ (deprecated)no header support recorded
autoplayAutoplaying media through HTMLMediaElement88+no header support recorded
bluetoothThe Web Bluetooth API104+no header support recorded
browsing-topicsThe Topics API115+ (deprecated)no header support recorded
cameraVideo input devices88+no header support recorded
captured-surface-controlThe Captured Surface Control API136+no header support recorded
ch-ua-high-entropy-valuesNavigatorUAData.getHighEntropyValues()144+no header support recorded
compute-pressureThe Compute Pressure API125+no header support recorded
cross-origin-isolatedWhether the document can be cross-origin isolated88+no header support recorded
deferred-fetchThe top-level origin's fetchLater() quota135+no header support recorded
deferred-fetch-minimalThe shared cross-origin subframe fetchLater() quota135+no header support recorded
display-captureScreen capture with getDisplayMedia()94+no header support recorded
encrypted-mediaThe Encrypted Media Extensions API88+no header support recorded
fullscreenElement.requestFullscreen()88+no header support recorded
gamepadThe Gamepad API103+no header support recorded
geolocationThe Geolocation interface88+no header support recorded
gyroscopeDevice orientation via Gyroscope88+no header support recorded
hidThe WebHID API89+no header support recorded
identity-credentials-getFederated Credential Management (FedCM)110+no header support recorded
idle-detectionThe Idle Detection API94+no header support recorded
language-detectorLanguage detection in the Translator and Language Detector APIsnot listed in BCDno header support recorded
language-modelThe Prompt API148+no header support recorded
local-fontsWindow.queryLocalFonts()103+no header support recorded
local-networkRequests to local network addresses145+no header support recorded
local-network-accessAlias for local-network and loopback-network142+no header support recorded
loopback-networkRequests to loopback addresses145+no header support recorded
magnetometerDevice orientation via Magnetometerbehind a flagno header support recorded
microphoneAudio input devices88+no header support recorded
midiThe Web MIDI API88+no header support recorded
on-device-speech-recognitionOn-device speech recognition in the Web Speech API142+no header support recorded
otp-credentialsWebOTP one-time password requests93+no header support recorded
paymentThe Payment Request API88+no header support recorded
picture-in-picturePicture-in-Picture video88+no header support recorded
private-state-token-issuancePrivate state token token-request operations117+no header support recorded
private-state-token-redemptionPrivate state token redemption operations117+no header support recorded
publickey-credentials-createCreating Web Authentication credentials88+no header support recorded
publickey-credentials-getReading Web Authentication credentials88+no header support recorded
screen-wake-lockThe Screen Wake Lock API88+no header support recorded
serialThe Web Serial API89+no header support recorded
speaker-selectionListing and selecting speakers (Audio Output Devices API)not listed in BCDno header support recorded
storage-accessThe Storage Access API for third-party iframes113+no header support recorded
summarizerThe Summarizer API138+no header support recorded
translatorTranslation in the Translator and Language Detector APIsnot listed in BCDno header support recorded
unloadRunning unload event handlers115+no header support recorded
usbThe WebUSB API88+no header support recorded
web-shareNavigator.share()88+no header support recorded
window-managementThe Window Management API100+no header support recorded
xr-spatial-trackingThe WebXR Device API88+no header support recorded

How to set a Permissions-Policy

  1. 1
    Choose a starting pointStart from the lockdown list to switch off hardware and tracking APIs your site doesn't use, or start empty.
  2. 2
    List 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.
  3. 3
    Pick the outputCopy the header, the Next.js headers() entry, the nginx or Apache line, or the iframe allow attribute for an embed.
  4. 4
    Test 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?
They are the same idea under two names. MDN says the name changed and so did the HTTP header syntax, while the iframe allow attribute kept the Feature Policy syntax. Feature-Policy writes camera 'none'; geolocation 'self', separated by semicolons. Permissions-Policy writes camera=(), geolocation=(self), separated by commas. Browser-compat-data marks Feature-Policy deprecated.
Why does self have no quotes in the header but quotes in the iframe allow attribute?
The header is a structured dictionary, where self is a bare token and origins are quoted strings. The allow attribute uses the older Feature Policy syntax, where keywords are in single quotes ('self', 'none', 'src') and origins are written without quotes. This tool converts the same list to either form.
Does the header work in Firefox and Safari?
Not according to MDN's browser-compat-data (version 8.1.8, 2 November 2026), which records the Permissions-Policy header in Chrome and Edge from version 85 and no support in Firefox or Safari. MDN labels the feature limited availability. The iframe allow attribute does work in Firefox 74 and Safari 11.1 and later, so use both when you embed third-party frames.
What does allow="camera" with no value mean?
MDN says a feature listed in allow with no allowlist defaults to 'src', so allow="camera" equals allow="camera 'src'": the feature is granted to the origin of the iframe's src URL. It does not grant it to other origins the frame navigates to unless you list them.
Can I use wildcards in origins?
Where supported, yes. MDN gives ("https://example.com" "https://*.example.com") as an example and notes that https://*.example.com does not match https://example.com itself. Browser-compat-data lists wildcard origin support in Chromium 108 and later only, so list the bare domain as well.
Does disabling a feature remove the browser's permission prompt for my own site?
Yes for the features you switch off: with camera=(), calls to the camera API are blocked before any prompt, for your page and every frame. For features you allow, the browser's usual permission prompt still decides whether the user grants access. The policy decides who may ask; the user still decides whether to say yes.

Sources

Related tools

See all 135 free tools

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