Skip to main content

CORS Header Analyzer

Paste HTTP response headers from any API and instantly decode the CORS policy. See which origins and methods are allowed, whether credentials are permitted, and what preflight requirements apply — with plain-English explanations for each header.

✓ Decode all CORS headers ✓ Credential + preflight analysis ✓ Runs 100% in your browser

Frequently Asked Questions

What CORS headers should I look for in an API response?▼

The key headers are: Access-Control-Allow-Origin (which origins can read the response), Access-Control-Allow-Methods (which HTTP methods are permitted), Access-Control-Allow-Headers (which request headers are allowed), Access-Control-Allow-Credentials (whether cookies/auth are permitted), and Access-Control-Max-Age (how long preflight results can be cached). Paste your response headers here and this tool shows what each one means and whether your request would be allowed.

What does Access-Control-Allow-Origin: * mean?▼

Wildcard (*) means any origin can read the response. This is appropriate for public APIs (CDN assets, open data APIs) but dangerous for APIs that return user-specific data. Crucially, * cannot be combined with Access-Control-Allow-Credentials: true — the browser will block the request with a CORS error. For credentialed requests, the server must echo back the specific requesting origin.

Why do I get a CORS error even though the header is present?▼

Several gotchas: (1) The header value doesn't match your origin exactly — scheme, host, and port must all match. (2) You're using credentials (cookies, Authorization header) with a wildcard origin. (3) The server is only sending CORS headers for OPTIONS preflight, not for the actual request. (4) Your server framework strips headers on error responses. (5) A CDN or proxy is stripping CORS headers before they reach the browser.

What is an OPTIONS preflight request?▼

For 'non-simple' cross-origin requests — those using methods other than GET/POST/HEAD, or custom headers like Authorization or Content-Type: application/json — browsers first send an HTTP OPTIONS request to ask the server what it permits. The server must respond with Access-Control-Allow-Methods and Access-Control-Allow-Headers. If the preflight fails or is missing required headers, the actual request is never sent.

How does Access-Control-Max-Age reduce latency?▼

Access-Control-Max-Age tells the browser how many seconds to cache the preflight result. Without it (or with a low value), the browser sends an OPTIONS preflight before every cross-origin request. With a high value (e.g., 86400 = 1 day), the browser skips the preflight for subsequent requests to the same endpoint. This eliminates the round-trip latency of the OPTIONS request for repeat callers.

What does Access-Control-Expose-Headers do?▼

By default, JavaScript can only read a small set of 'safe' response headers (like Content-Type and Cache-Control). Access-Control-Expose-Headers explicitly whitelists additional headers for JavaScript access. This is commonly needed for pagination (Link header), rate limiting (X-Rate-Limit-Remaining), request tracing (X-Request-Id), and API versioning headers. Without it, response.headers.get('x-request-id') returns null even if the header is present.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

CORS Policy Builder OpenAPI Validator HTTP Status Code Reference API Request Builder API Response Mock Generator HTTP Status Code Reference HTTP Status Code Lookup HTTP Status Code Lookup API Response Time Tester HTTP Methods Reference OpenAPI Schema Validator CORS Policy Tester OpenAPI Mock Generator API Test Case Generator HTTP Headers Analyzer API Response Formatter & Analyzer HTTP API Tester HTTP Security Headers Generator HTTP Status Code Reference CORS Policy Validator HTTP Header Analyzer API Mock Server Config Generator REST API Request Builder HTTP Security Headers Checker API Response Mocker API Rate Limit Calculator CORS Tester CORS Header Tester HTTP Headers Inspector HTTP Code Snippet Generator HTTP Mock Response Builder LLM Cost Calculator HTTP Cache-Control Builder AI Prompt Cost Calculator HTTP/2 Server Push Headers Builder Mock Service Worker (MSW) API Mocking Guide Content Security Policy Builder LLM Prompt Cost Calculator HTTP Header Inspector AI Rate Limit Calculator HTTP Cache Header Builder Prompt Injection Tester GCP Service Account Key Auditor API Key Generator AI Doc Generator — Pro Tool AI System Guardian curl Command Builder .htaccess Generator JSON Diff Viewer JSON Diff nginx Config Generator Password Strength Checker Developer Utilities Rate Limiter Tester API Changelog Generator CSP Header Builder Rate Limit Calculator Webhook Tester AWS IAM Policy Validator Haproxy Config Validator Caddy Caddyfile Generator HTTP Cookie Parser HAR Diff Analyzer SBOM Generator Vue Component Generator LLM Context Window Calculator LLM Token Counter Dockerfile Linter SSL Certificate Checker Prompt Token Estimator nginx Config Builder Pulumi Modern IaC Guide Docker Layer Optimizer HTML5 Canvas API Playground Token Context Calculator OpenAI Function Calling Generator Token Counter & Cost Estimator AI API Rate Limit Calculator Password Strength Analyzer

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →