Permissions-Policy (Feature-Policy) HTTP Header Generator & Tester
HTTP Security Headers & Device Permissions

Permissions-Policy (Feature-Policy) HTTP Header Generator & Tester

Build, inspect, and validate modern Permissions-Policy HTTP response headers (camera, microphone, geolocation, payment) with strict per-origin allowlists.

Presets:
Header Directives Configuration
cameracritical

Controls access to video input capture devices (webcams, front/back lenses).

microphonecritical

Controls access to audio input recording devices and system microphones.

geolocationcritical

Controls access to fine and coarse GPS geographic coordinate coordinates.

paymentcritical

Controls browser native Payment Request API dialogues and digital wallets.

display-capturecritical

Controls Screen Capture API allowing pages to record user desktops and displays.

usbhigh

Controls WebUSB API for low-level direct access to wired USB hardware devices.

bluetoothhigh

Controls Web Bluetooth API to pair and read wireless Bluetooth LE peripherals.

hidhigh

Controls WebHID API for non-standard human interface devices and specialized gamepads.

serialhigh

Controls Web Serial API for bi-directional communication with RS-232 serial hardware.

otp-credentialshigh

Controls WebOTP API reading one-time SMS verification tokens from mobile OS.

clipboard-readhigh

Controls programmatic reading of sensitive text and graphics from system clipboard.

clipboard-writemedium

Controls programmatic writing of arbitrary data onto the user system clipboard.

accelerometermedium

Controls motion sensor measuring physical acceleration force along XYZ vectors.

gyroscopemedium

Controls orientation sensor measuring angular rotational velocity in 3D space.

magnetometermedium

Controls magnetic field sensor acting as digital compass and orientation sensor.

ambient-light-sensormedium

Controls ambient light sensor measuring lux environmental illumination levels.

idle-detectionmedium

Controls Idle Detection API sensing user keyboard/mouse inactivity and screen lock.

midimedium

Controls Web MIDI API interacting with synthesizers, controllers, and musical gear.

speaker-selectionmedium

Controls selectAudioOutput() to route audio playback to discrete speaker sinks.

browsing-topicsmedium

Controls Chrome Privacy Sandbox Topics API for cross-site interest ad profiling.

run-ad-auctionmedium

Controls Protected Audience API running local on-device ad bidding auctions.

join-ad-interest-groupmedium

Controls enrolling users into remarketing interest groups for targeted campaigns.

storage-accessmedium

Controls Storage Access API unlocking third-party cookie access inside iframes.

local-fontsmedium

Controls querying the complete catalog of locally installed operating system fonts.

sync-xhrmedium

Controls synchronous XMLHttpRequest calls which freeze the browser UI main thread.

publickey-credentials-getmedium

Controls retrieving WebAuthn credentials and biometric passkeys during login.

publickey-credentials-createmedium

Controls registering new public-key credentials and FIDO2 passkeys on domain.

identity-credentials-getmedium

Controls Federated Credential Management (FedCM) identity provider sign-in dialogs.

cross-origin-isolatedmedium

Controls cross-origin isolation requirements for SharedArrayBuffer and High-Res Timers.

xr-spatial-trackingmedium

Controls WebXR immersive VR and AR spatial room, head, and hand motion tracking.

fullscreenlow

Controls Element.requestFullscreen() allowing documents to enter full-screen mode.

autoplaylow

Controls automatic autoplay of HTML5 video and audio media elements without tap.

picture-in-picturelow

Controls HTMLVideoElement.requestPictureInPicture() for floating media windows.

encrypted-medialow

Controls Encrypted Media Extensions (DRM / Widevine / PlayReady playback).

screen-wake-locklow

Controls Screen Wake Lock API preventing mobile displays from sleeping or dimming.

gamepadlow

Controls Gamepad API polling button presses and analog thumbsticks on controllers.

web-sharelow

Controls navigator.share() invoking native system-level sharing dialogues.

compute-pressurelow

Controls Compute Pressure API providing CPU load and thermal throttling telemetry.

window-managementlow

Controls Multi-Screen Window Placement API detecting connected secondary monitors.

Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), display-capture=(), usb=(), bluetooth=(), hid=(), serial=(), screen-wake-lock=(), idle-detection=(), browsing-topics=(), run-ad-auction=(), join-ad-interest-group=(), clipboard-read=(), sync-xhr=(), local-fonts=(), midi=(), otp-credentials=(), fullscreen=(self), autoplay=(self), publickey-credentials-get=(self), publickey-credentials-create=(self), encrypted-media=(self)
Configured Directives
24 of 39 Policies Enforced
Security Hardening Grade
Score 100 / 100 (A+)
Specification Standard
W3C Permissions Policy L1 / RFC 8941

W3C Permissions Policy L1

Compiles modern structured field syntax conforming to official W3C Permissions Policy specifications, replacing deprecated Feature-Policy headers with precise per-origin allowlists.

Zero-Knowledge Client Computation

All policy syntheses, header parses, and cryptographic security audits execute 100% locally in your browser memory. No headers or origin domains are ever sent to remote servers.

Universal Multi-Server Export

Generates copy-paste configurations for Nginx, Apache HTTPD, Caddy Server, Next.js security headers, and HTML iframe allow attributes with instant validation.

Technical Reference & Architecture Guide

Permissions-Policy (Feature-Policy) HTTP Header Generator & Tester — Reference Guide

Build and validate modern Permissions-Policy HTTP response headers (camera, geolocation, microphone, payment) with strict origin allowlists.

Key Parameters & Controls

cameradirective (allowlist)

Controls whether the document and embedded iframes are allowed to access video input devices via MediaStream or getUserMedia().

Default: ()
microphonedirective (allowlist)

Controls access to audio capture hardware devices through the Media Capture and Streams API.

Default: ()
geolocationdirective (allowlist)

Restricts access to the user physical geographic location coordinates via the navigator.geolocation interface.

Default: (self)
paymentdirective (allowlist)

Governs access to the Payment Request API for web-based commerce checkouts and secure transaction flows.

Default: (self "https://checkout.stripe.com")
display-capturedirective (allowlist)

Controls permission to capture display surfaces and screen recordings using navigator.mediaDevices.getDisplayMedia().

Default: ()

Pro Tips & Best Practices

Feature-Policy used unparenthesized

Feature-Policy used unparenthesized space-separated origins (e.g., camera 'none'), whereas Permissions-Policy conforms to RFC 8941 Structured Headers with parenthesized lists and double quotes (e.g., camera=(), geolocation=(self)). Always deploy Permissions-Policy for modern browsers.

Permissions-Policy defines the top-level

Permissions-Policy defines the top-level origin ceiling. For an embedded third-party iframe to use permitted APIs like payments or webcams, the parent document must permit it in the HTTP header AND explicitly specify the permission on the element via allow="payment 'src'".

Harden web application security posture

Harden web application security posture by explicitly declaring empty allowlists for unneeded APIs: accelerometer=(), gyroscope=(), magnetometer=(), usb=(), serial=(), interest-cohort=(). This mitigates acoustic eavesdropping, motion fingerprinting, and cohort tracking.

When delegating permissions to trusted

When delegating permissions to trusted third-party providers, wrap domain origins in double quotes inside parentheses separated by spaces: payment=(self "https://pay.example.com" "https://js.stripe.com"). Never omit quotes around explicit URLs.

Common Gotchas & Troubleshooting

DOMException: NotAllowedError thrown when calling getUserMedia() or navigator.geolocation

Inspect the document Permissions-Policy response header to confirm the requesting origin is present in the directive allowlist. If invoked inside an iframe, verify that both the top-level HTTP header and the iframe element allow attribute grant access.

Browser console reports syntax error or ignores Permissions-Policy directives

Ensure origin strings are enclosed in double quotes and lists use parentheses. Permissions-Policy does not accept single quotes (like CSP) or unparenthesized token lists (e.g., use camera=(), not camera='none' or camera=none).

Third-party payment or authentication widget blocked inside embedded iframe

Verify that the top-level document Permissions-Policy includes the third-party origin (e.g., payment=(self "https://auth.vendor.com")) and that the iframe element specifies allow="payment https://auth.vendor.com". If top-level declares payment=(), all descendant frames are unconditionally blocked.

Frequently Asked Questions

What is the difference between Feature-Policy and Permissions-Policy?▼

Permissions-Policy is the standardized successor to Feature-Policy. While Feature-Policy used CSP-like syntax (feature 'self'), Permissions-Policy uses RFC 8941 Structured Field Values (feature=(self)), offering strict typing, standardized parsing, and consistent browser enforcement.

Does Permissions-Policy replace Content Security Policy (CSP)?▼

No, they operate in tandem to provide defense-in-depth. CSP controls which resources (scripts, styles, images, connections) can be loaded and executed, preventing XSS and injection attacks. Permissions-Policy controls access to powerful hardware and browser APIs (camera, microphone, geolocation, screen capture).

How does Permissions-Policy propagate down to iframes and child browsing contexts?▼

Permissions-Policy acts as an absolute boundary. An iframe can never escalate privileges beyond what the top-level document allows. Even if an iframe requests access, it is denied unless the parent document explicitly delegates permission via HTTP headers and the iframe tag allow attribute.

Can I configure Permissions-Policy inside an HTML <meta> tag?▼

No. The W3C specification explicitly forbids delivering Permissions-Policy via <meta http-equiv="Permissions-Policy">. It must be configured strictly as an HTTP response header on web servers (e.g., Nginx, Apache, Cloudflare Workers, Next.js headers).

What is the recommended baseline policy for secure enterprise applications?▼

A recommended hardening baseline disables unused sensitive capabilities: camera=(), microphone=(), geolocation=(), payment=(), usb=(), display-capture=(), serial=(), accelerometer=(), gyroscope=(), magnetometer=(), interest-cohort=(). You can then selectively re-enable (self) for specific features required by your app.

Related Tools & Utilities

All Tools →