b2KIT

Permissions Policy Builder

Build Permissions-Policy (formerly Feature-Policy) headers to control browser feature access for your site.

Tested tool guide Tested browser tools Checked August 16, 2026

What Permissions Policy Builder does, with a checked example

The Permissions-Policy header tells the browser which powerful features a page and its embedded frames may use. This tool walks the list of policy-controlled features - geolocation, camera, microphone, payment, fullscreen, clipboard, and others - lets you set each one's allowlist (nobody, your own origin, specific origins, or everyone), and emits the complete header value to paste into your server or CDN response-header configuration. The thing people most often get wrong: the policy cannot be set from a meta tag and is ignored over plain HTTP, so a correctly generated header can still silently do nothing. Blocked features also stay detectable by JavaScript, so testing needs real API calls, not feature detection.

Worked example

A concrete input and expected output from the current implementation.

Input

Block geolocation for everyone; allow camera for the site's own origin only; allow microphone for the site's own origin and for frames from https://meet.example.com

Expected output

Permissions-Policy: geolocation=(), camera=(self), microphone=(self "https://meet.example.com")

Each directive pairs a feature with its allowlist: () admits no origin, self admits only the site's own origin, and a quoted origin extends access to that embedded origin. The three comma-separated directives form the single header value to send with every response.

How the result is produced

1

From selections to header value

Each feature becomes one directive: the feature name, an equals sign, and an allowlist in parentheses - () blocks everyone, self admits only the page's own origin, quoted origins admit specific embedded origins, and * admits all origins. Directives are joined with commas into one header string. The same allowlist grammar appears in the iframe allow attribute, so the choices carry over to embedded content.

2

How browsers enforce it

The browser applies the policy to the page and every nested frame. An embedded cross-origin frame may use a feature only if the header's allowlist (or an iframe allow attribute) grants it, and policies can only tighten as they nest - a frame can never widen what its parent allowed. Denied features remain defined in JavaScript, so failures surface as rejected promises or error callbacks at call time, not as missing APIs.

Good uses

  • Locking down a marketing site that embeds third-party widgets: block camera, microphone, geolocation, and USB for everyone and keep the generated header in server config so every response carries it.
  • Preparing a policy for an app with cross-origin iframes - a video call, a map, a payments frame - where one frame needs a feature without opening every feature to every third-party origin.
  • Filling the Permissions-Policy gap flagged by a security scan or hardening checklist: generate a header naming the features the site genuinely uses and verify the exact directive syntax before deploying.

Limits and checks

  • Header-only and TLS-bound: a meta tag does nothing (unlike CSP), and browsers enforce the header only in secure contexts - HTTPS or localhost. Inspect the response headers in DevTools on a real HTTPS page, or the policy may never have been active.
  • Blocking is not removal: a denied feature still exposes its API, so typeof checks pass; failures appear only when code calls it (geolocation error callback, getUserMedia NotAllowedError, fullscreen promise rejection). The old Feature-Policy header and its 'none' and 'src' keywords are deprecated - keep the new name and parenthesized syntax.
  • Tightening is one-way and defaults persist: an iframe allow attribute cannot re-enable what the header blocked, features you never list keep their browser defaults (usually self), and the header governs the page plus everything nested in it - a broken embedded widget usually means its origin was left out of the allowlist.

Common questions

Can I set Permissions-Policy in a meta tag like Content-Security-Policy?

No. Permissions-Policy must arrive as a real HTTP response header, set in server, proxy, or CDN configuration, and browsers only enforce it in secure contexts (HTTPS or localhost). There is no meta-tag equivalent, so the generated value belongs in response-header settings, never in the HTML.

If I block a feature, will the site's JavaScript stop seeing it?

No. The API remains present - navigator.geolocation, getUserMedia, and requestFullscreen are all still defined - but every call fails: geolocation reports a permission error and getUserMedia rejects with NotAllowedError. Handle those failures deliberately and test real behavior in the browser rather than relying on feature detection.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools