CORS Header Explainer & Validator

Paste CORS response headers and get a plain-English breakdown of what they allow

Ad placeholder (leaderboard)

Cross-Origin Resource Sharing (CORS) is the browser mechanism that decides whether JavaScript on one origin may read a response from another. It is controlled entirely by a set of Access-Control-* response headers, and small mistakes can either break legitimate requests or open serious security holes. This tool parses pasted CORS headers and explains, in plain English, exactly what they permit — and flags dangerous combinations.

How it works

The tool reads each recognised CORS response header and interprets it against the CORS spec:

  1. Access-Control-Allow-Origin — the single origin (or *) allowed to read the response.
  2. Access-Control-Allow-Methods — the HTTP methods permitted on the actual request (returned in preflight).
  3. Access-Control-Allow-Headers — which request headers the client may send.
  4. Access-Control-Allow-Credentials — whether cookies and auth headers are allowed; must not be true alongside a * origin.
  5. Access-Control-Max-Age — how long the preflight result may be cached, in seconds.
  6. Access-Control-Expose-Headers — which response headers JavaScript is allowed to read.

It then runs validation: the forbidden wildcard-plus-credentials combination, a * origin (read access for any site), and Allow-Headers: * with credentials (also invalid) are all flagged.

Tips and example

Given these headers:

Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true

the tool explains that any origin may read the response and warns that this exact combination is rejected by browsers — credentials cannot be sent to a wildcard origin. The fix is to echo the specific requesting origin instead of * whenever credentials are involved, and to keep * only for truly public, unauthenticated endpoints.

Ad placeholder (rectangle)