Skip to content

Menu

Permissions-Policy Generator

Free Permissions-Policy header generator. Pick features like camera and geolocation, set allowlists, and get the matching iframe allow attribute.

Runs entirely in your browserAPI & HTTPFree, no sign-up
Loading tool

01What is Permissions-Policy Generator?

Permissions-Policy Generator builds the Permissions-Policy response header from a list of browser features. The header tells the browser which powerful features your page and its embedded frames may use. Turning off what you never use shrinks what a third-party script or iframe can reach. Add a feature such as camera, microphone, geolocation or fullscreen, then choose who may use it. Blocked everywhere writes (), this origin only writes (self), any origin writes *, and a custom list writes self and the origins you enter, each in double quotes. The header uses the Structured Field dictionary syntax from the W3C Permissions Policy spec, so entries are separated by commas and allowlists sit in parentheses. Origins are cleaned to scheme, host and port, so https://meet.example.com/x becomes https://meet.example.com. Anything that is not a valid http or https origin is flagged. The tool also flags a feature listed twice, since only one entry per key survives in a dictionary and the last one wins. A custom list with no origins is flagged too, because it means the same as (). A feature set to * gets a note that any embedded frame can use it once the iframe allow attribute delegates it. The second output is the allow attribute for an iframe. Enter the origin of the page you embed, and the tool lists each feature the header grants to that origin, in the form camera https://meet.example.com. Features limited to self, or with a custom list that leaves the embed out, are skipped, and a note explains why. A frame only gets a feature when both the header and the allow attribute permit it, so adding a feature to allow alone does nothing. Here is a worked example. Set geolocation to blocked, fullscreen to this origin only, and camera to a custom list with self and https://meet.example.com. The header reads geolocation=(), fullscreen=(self), camera=(self "https://meet.example.com"). With https://meet.example.com as the embed origin, the allow attribute is camera https://meet.example.com. A note says fullscreen was left out, because the header does not grant it to that origin. The feature list covers 31 names documented on MDN, and browser support for each one varies. Some, such as clipboard-read, are not supported in every browser, and unknown names are ignored by browsers rather than causing an error. The tool does not check support, and it does not read your existing headers. It runs in your browser and sends nothing anywhere.

Web developers and security engineers who set response headers or embed third-party iframes. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Permissions-Policy Generator

  1. Pick an example or press Reset to start empty
  2. Add features from the dropdown
  3. Choose an allowlist for each feature and enter origins for custom lists
  4. Enter the origin of any iframe you embed
  5. Fix any errors, then copy the header and the allow attribute

03Worked examples

Input: camera, microphone, geolocation, usb and payment all blocked
Result: camera=(), microphone=(), geolocation=(), usb=(), payment=()
A lockdown header for a site that needs none of these features. No embed origin, so no allow attribute.
Input: camera and microphone for self plus https://meet.example.com, display-capture self, geolocation blocked, embed origin https://meet.example.com
Result: camera=(self "https://meet.example.com"), microphone=(self "https://meet.example.com"), display-capture=(self), geolocation=() allow="camera https://meet.example.com; microphone https://meet.example.com"
display-capture is left out of allow because the header only grants it to self.
Input: payment and publickey-credentials-get for self plus https://checkout.example.com, camera and microphone blocked, embed origin https://checkout.example.com
Result: payment=(self "https://checkout.example.com"), publickey-credentials-get=(self "https://checkout.example.com"), camera=(), microphone=() allow="payment https://checkout.example.com; publickey-credentials-get https://checkout.example.com"
A checkout iframe that needs the Payment Request API and passkey sign-in. Both are granted in the header and delegated in allow, with no warnings.
Input: geolocation custom list with "maps.example.com" and self unticked, clipboard-write self, embed origin https://maps.example.com
Result: geolocation=(), clipboard-write=(self) error: geolocation: "maps.example.com" is not a valid origin. Use a full origin such as https://example.com. warning: geolocation: the custom list is empty, which is the same as ().
An origin without https:// is dropped, so the list ends up empty and blocks the feature. Two info lines about the allow attribute are left out here.
Input: fullscreen for all, autoplay for self plus https://player.example.com, camera blocked, embed origin https://player.example.com
Result: fullscreen=*, autoplay=(self "https://player.example.com"), camera=() allow="fullscreen https://player.example.com; autoplay https://player.example.com" info: fullscreen=* lets any embedded frame use it once the iframe allow attribute delegates it.
A wildcard grant is shown as info, since any frame can use it once the iframe delegates it.

04Common use cases

  • Turning off camera, microphone and geolocation on a site that never uses them
  • Letting an embedded video call widget use the camera and microphone
  • Allowing fullscreen for an embedded video player
  • Writing the iframe allow attribute that matches an existing header
  • Reviewing which origins get access to sensitive features

05Tips

  • Block features you never use with () so injected scripts and embeds cannot ask for them.
  • An iframe needs the feature in both the parent's header and its allow attribute.
  • Use full origins with a scheme, such as https://example.com, in custom lists.
  • Test in each browser you support, since feature support differs.

06Related concepts

Permissions Policy, Feature Policy, iframe allow, Structured Fields, allowlist.

Frequently Asked Questions

What is Permissions-Policy Generator?

Permissions-Policy Generator is a free, browser-based developer tool on AIDToolStack. Free Permissions-Policy header generator. Pick features like camera and geolocation, set allowlists, and get the matching iframe allow attribute. It requires no installation or sign-up and works entirely in your browser.

Is Permissions-Policy Generator free to use?

Yes. No sign-up, no fees and no usage cap.

Does Permissions-Policy Generator store my data?

No. It runs in your browser; nothing is uploaded.

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe