Skip to main content
KalkuNet

Permissions-Policy Generator — Restrict Camera, Microphone and Location with a Header

Restrict browser camera, microphone, geolocation & payment APIs via header.

Runs in your browserWeb · Security & Privacy
Quick set:
Camera camera()
Microphone microphone()
Location (GPS) geolocation
USB devices usb()
Serial ports serial()
HID devices hid()
MIDI midi()
Accelerometer accelerometer()
Gyroscope gyroscope()
Magnetometer magnetometer()
Payment Request payment()
Passkey sign-in (WebAuthn) publickey-credentials-get(self)
Clipboard read clipboard-read()
Clipboard write clipboard-write(self)
Topics API (ads) browsing-topics()
Autoplay autoplay(self)
Encrypted media (DRM) encrypted-media(self)
Picture-in-picture picture-in-picture(self)
Screen capture display-capture()
Fullscreen fullscreen(self)
Screen wake lock screen-wake-lock()
WebXR (VR/AR) xr-spatial-tracking()

When to use the HTTP Permissions-Policy Header Builder

  • Features Chrome recognises

    The feature list only holds names Chrome recognises, so there are no unknown-feature warnings in the console and no rule is silently ignored.

  • Correct structured-header syntax

    Values follow RFC 8941: () to block, (self) for this site and origins in quotes. A small mistake here makes browsers reject the whole header.

  • Allow specific iframes only

    Features such as location can be granted only to an embedded map from a specific origin, while ad iframes or other widgets stay blocked.

  • Ready for your server

    The result comes as an HTTP header, an Nginx or Apache line, or a _headers file for Cloudflare Pages and Netlify, with quotes already escaped.

Frequently asked questions

What is the difference from Feature-Policy?

Feature-Policy is the old name with a different syntax and is deprecated. Modern browsers read Permissions-Policy; send only the new header.

Which features should I block?

Everything your site does not use. A typical content site blocks camera, microphone, location, USB, payment and sensors, and allows fullscreen for itself.

How do I make sure the header works?

Open DevTools → Application → Frames → Permissions Policy, or check the score in the Security Headers Analyzer. Syntax errors show up as console errors.

Does the header apply to iframes?

Yes. An iframe from another site can only use a feature when this header lists the iframe's origin and the iframe tag also grants it with the allow attribute; both have to allow it.

Learn more