Skip to content
Tesserae

Keyboard shortcuts

Focus search
/
This help dialog
?
Run the current tool
Ctrl/⌘ +Enter
Copy the output (when an output is focused)
Ctrl/⌘ +C

Shortcuts are ignored while you are typing in an input, a textarea or a select.

Web & CSS

Document-Policy Builder & Analyzer

Generate or analyze Document-Policy directives for controlling document behaviors such as unload handlers, sync XHR, and layout performance features. Validates tokens, numeric thresholds, duplicate directives, and explains rollout and browser-support caveats locally.

On-device No network Offline-ready

🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.

Try:

Options

Your result will appear here

Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.

How it works

Building a policy line

Build mode turns a comma-separated directive list into the Document-Policy header value. Every directive must use parenthesized policy syntax, and an empty list or any malformed entry stops the build with a clear error instead of emitting a broken header.

Reading pasted directives

Analyze mode splits the header on commas while keeping quoted values intact, then lists each directive name, its value and a status. It catches invalid tokens, duplicate directives, values that are not parenthesized, and numeric thresholds above 1000 as unusually high.

A sensible moment to use it

Reach for it when auditing a site that already sends Document-Policy, or when drafting an unload or sync-xhr opt-out to try in a staging environment before it reaches production.

Support varies, so test first

Directive semantics and browser support differ, so a header that looks valid here may be ignored or enforced differently elsewhere. Validate the affected code before enforcing a policy, since it can change page behaviour.

Analyzed on-device

Directives are parsed and generated inside the browser. Nothing is uploaded and no network request is made.

Questions

What does Document-Policy control?

It lets a document opt into or restrict browser behaviors and performance-related features, depending on browser support and the directive.

Is it the same as Permissions-Policy?

No. Permissions-Policy governs powerful feature access and delegation; Document-Policy governs document behavior and performance controls.

Should I deploy it immediately?

Roll out carefully, validate browser support, and test affected code because enforcing a policy can change page behavior.

See category