Cross-Origin Isolation Header Builder
Generate COOP, COEP and CORP headers for SharedArrayBuffer and WASM threads.
Directives
3 headersControls window.opener sharing. same-origin isolates; allow-popups keeps OAuth popups working.
require-corp needs CORP/CORS on subresources; credentialless loads no-cors resources without credentials.
Deployment checklist
- Add crossorigin to <script>, <img> and <link> tags fetching cross-origin resources, or ensure those servers send Access-Control-Allow-Origin / CORP.
- Check classic worker scripts used by WASM pthreads — no-cors workers are blocked under require-corp; serve them with CORP or use CORS.
- Opaque (no-cors) images and service-worker cached opaque responses will break — switch to CORS mode or proxy them.
- Verify deployment over HTTPS (or localhost): self.crossOriginIsolated in the browser console should be true when enforced headers ship.
- Confirm the headers are present on every response, including static assets and error pages (nginx: add_header inheritance trap).
Verify
// Browser console self.crossOriginIsolated // true when isolation is active typeof SharedArrayBuffer // "function" when available
curl -sI https://example.com | grep -iE 'cross-origin-(opener|embedder)-policy'
Output
headers · 3 headersCross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: require-corp Cross-Origin-Resource-Policy: same-origin
- require-corp: cross-origin subresources must send CORP or be loaded with CORS (crossorigin attribute); no-cors images, classic worker scripts and opaque service-worker responses will fail.
Pick COOP, COEP and CORP directive values and immediately see whether crossOriginIsolated is achievable — including secure-context and report-only caveats. The tool emits copy-ready header lists plus nginx, Apache, Caddy, Express, Netlify and Vercel snippets from one source of truth, with a deployment checklist covering CORS, worker scripts, opaque responses and console verification.
Examples
Enable WASM threads
COOP same-origin, COEP require-corp, CORP same-origincrossOriginIsolated expected trueAll three headers ship on every response and subresources are loaded with CORS or carry CORP.
Keep third-party images
COOP same-origin, COEP credentiallessno CORP required on third-party hostscredentialless removes ambient credentials from no-cors subresources instead of requiring CORP headers from their owners.
Safe rollout
COEP Report-Only enabledCross-Origin-Embedder-Policy-Report-Only: require-corpViolations are reported before enforcement, but the verdict stays false until the enforcing header is shipped.
About this tool
Cross-origin isolation is the browser state that unlocks SharedArrayBuffer, high-resolution timers and WASM threading. It requires a specific pair of response headers: a non-unsafe Cross-Origin-Opener-Policy (COOP) plus a Cross-Origin-Embedder-Policy (COEP) of require-corp or credentialless. This builder lets you choose the directives, immediately see whether isolation is expected, and emit the headers in the syntax your server needs.
The verdict is modeled, not guessed: report-only variants never grant isolation, unsafe-none combinations never do, and a non-secure context (plain HTTP away from localhost) blocks isolation even with perfect headers. Popup-compatible COOP values are marked with their tradeoff — OAuth popups keep window.opener access but cannot share isolated memory — and require-corp's subresource duties are spelled out in a deployment checklist.
One header map drives every output: a plain header list, nginx add_header lines with the always flag and an inheritance warning, Express res.setHeader calls, a Netlify _headers block, a Vercel vercel.json headers array, Apache Header always set and Caddy header directives. Report-to tokens are validated so a stray quote or newline cannot corrupt a generated config, and an optional curl command helps verify what actually shipped.
What this tool does not do
- The verdict predicts the expected state; only self.crossOriginIsolated in the target browser after deployment is authoritative.
- Subresource compliance (CORP/CORS, worker scripts, opaque responses) depends on your deployment and cannot be audited from this builder.
- COEP credentialless and newer COOP values have uneven browser support — check your target matrix before relying on them.
How to use this tool
Choose a preset or directives
Start with WASM threads, third-party embeds, report-only rollout or off — or tune COOP, COEP and CORP yourself.
Read the verdict
The green verdict means isolation is expected; amber lists the exact reason it is not, including secure-context and report-only caveats.
Pick an output syntax
Switch tabs between headers, nginx, Express, Netlify, Vercel, Apache and Caddy, then copy or download the result.
Follow the checklist
Check CORS/CORP on subresources, classic worker scripts and opaque responses, then confirm with self.crossOriginIsolated in the console.
Use cases
WASM threading
Generate the exact header trio that makes SharedArrayBuffer available for pthread-enabled WebAssembly apps.
Site-wide hardening
Roll COOP/COEP out across an origin with nginx, Apache or Vercel config and a checklist for every subresource.
Debugging SAB undefined
Check report-only mode, secure context and CORP coverage — the three most common reasons crossOriginIsolated stays false in production.
Directive values that matter
| Header | Value |
|---|---|
| COOP | same-origin |
| COOP | same-origin-allow-popups |
| COOP | unsafe-none |
| COEP | require-corp |
| COEP | credentialless |
| CORP | same-origin / same-site / cross-site |
| *-Report-Only | same directives |
Isolation is expected only when COOP and COEP are both enforcing and non-unsafe, and the page is a secure context.
Common mistakes
Mistake:Shipping only Cross-Origin-Embedder-Policy and expecting SharedArrayBuffer.
Fix:Both COOP and COEP are required, both must be enforcing, and the page must be a secure context.
Mistake:Believing report-only headers grant isolation.
Fix:The -Report-Only variants only report violations; the builder's verdict stays false until you switch to enforcing headers.
Mistake:Adding add_header COOP/COEP only in the nginx server block.
Fix:A location block with any add_header of its own drops inherited headers — repeat the isolation headers inside every such location.
Frequently asked questions
Why is SharedArrayBuffer undefined on my site?
Usually one of three things: the COOP/COEP pair is missing or one value is unsafe-none, one of the headers is still in -Report-Only mode, or the page is not a secure context (plain HTTP away from localhost). Even with perfect headers, cross-origin subresources that neither carry CORP nor are loaded with CORS can break the isolated context. Check self.crossOriginIsolated in the console after each fix.
What's the difference between require-corp and credentialless?
require-corp blocks cross-origin subresources unless the server sends a Cross-Origin-Resource-Policy header or the resource is loaded with CORS. credentialless instead loads no-cors subresources without credentials, so third-party hosts that cannot add CORP headers still work. credentialless has less complete browser support, so feature-detect it before depending on it.
Can I use crossOriginIsolated with OAuth popups?
Yes, with a tradeoff. COOP same-origin-allow-popups preserves window.opener access for popups while still enabling isolation for the opener, but those popups are not themselves isolated and cannot share SharedArrayBuffer with the opener. Full same-origin COOP severs that relationship and can break popup-based OAuth flows.
Do my subresources need CORP?
Under require-corp, yes: cross-origin scripts, images, workers and fetches must either be served with Cross-Origin-Resource-Policy or loaded with CORS (for example the crossorigin attribute on script/img tags). Classic worker scripts used by WASM pthreads are fetched no-cors by default and need special attention. Under credentialless, no-cors responses load without credentials instead.
What is report-only mode?
Sending Cross-Origin-Opener-Policy-Report-Only or Cross-Origin-Embedder-Policy-Report-Only reports what would be blocked without enforcing the policy. It is how you safely roll headers out in stages — but report-only headers grant zero isolation. The builder's verdict reflects this and stays false until enforcing headers ship.
How do I verify the headers actually shipped?
In the browser console, self.crossOriginIsolated should be true and typeof SharedArrayBuffer should be function. From a shell, curl -sI https://your-site | grep -i cross-origin shows the response headers. Remember nginx's add_header inheritance trap: a location block with its own add_header drops headers declared only at server level.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.gitattributes Generator
Build .gitattributes rules for line endings, Git LFS, GitHub linguist marks and merge drivers — with a one-line explanation for every rule.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
A/B Test Sample Size Calculator
Compute required sample size per variant and test duration from baseline conversion rate, minimum detectable effect, alpha and power.
ABA Routing Number Validator
Validate 9-digit US ABA routing numbers with 3-7-1 Mod-10 breakdown.