Account

What new tool do you want?

Developer Tools

CORS Tester

Test whether an API allows cross-origin requests from the browser — any method, headers and credentials. See if a preflight was needed, what failed, and get the server config to fix it.

How to use

  1. 1Enter the API URL and method, plus any headers or body.
  2. 2Press Test CORS — the request is sent by your browser, just like a web app would.
  3. 3Read the verdict and copy the Express, nginx or Apache config to allow your origin.

Frequently asked questions

Why does it work in curl/Postman but not in my app?

CORS is enforced only by browsers. Servers must explicitly allow a web page's origin with Access-Control-Allow-Origin, and approve preflights for non-simple requests.

What is a preflight?

For methods like PUT/DELETE, custom headers or a JSON Content-Type, the browser first sends an OPTIONS request asking permission. The server must answer it with the right Access-Control-Allow-* headers.

How can it tell CORS apart from a dead server?

After a failed request it sends a second, opaque no-cors request. If that one succeeds, the server is up and the failure was a CORS block.

A real cross-origin request, enforced by your actual browser

This tool sends a genuine fetch() with mode: "cors" from whatever origin you're reading this page on — it doesn't simulate CORS, it triggers the browser's real CORS algorithm against the target server. That's the key difference from curl or Postman, which never apply CORS at all because it's a browser-only restriction on which scripts may read a cross-origin response, not a server-side access control.

Worked example: a public GitHub API endpoint

The default target, https://api.github.com/repos/vercel/next.js with method GET and no custom headers, classifies as a "simple" request (GET/HEAD/POST with only safelisted headers), so no preflight is sent. GitHub's API responds with access-control-allow-origin: * on that endpoint, so the tool reports "CORS allowed" with the HTTP status and timing — any origin can read this particular response, which is exactly what you'd see calling it from a real frontend.

Why some requests need a preflight and others don't

Switching the method to PUT/DELETE, adding a custom header, or setting Content-Type to application/json all push a request out of the "simple" category defined by the Fetch spec — the tool flags each reason it detects before you even press Test CORS. For those, the browser first sends an OPTIONS preflight asking permission, and the server must answer it with matching Access-Control-Allow-Methods and Access-Control-Allow-Headers before the real request is even attempted. With credentials (cookies) enabled, the rules tighten further: Access-Control-Allow-Origin can no longer be a wildcard and must echo your exact origin, paired with Access-Control-Allow-Credentials: true.

Telling a CORS block apart from a dead server

A failed cross-origin fetch throws the same generic error whether the server rejected CORS or never responded at all — so on failure, the tool quietly fires a second, opaque mode: "no-cors" request to the same URL. If that one goes through, the server is reachable and the first failure was specifically a CORS rejection, not an outage; the result also copies ready-to-use Express, nginx and Apache snippets configured for your current origin so you can fix the server side immediately.

GET and HEAD disable the body, and the snippet tab opens on Express

The address opens on a public repository endpoint, the method opens on GET, and the header box starts empty. Credentials start off. The body box is disabled for GET and HEAD, so I cannot attach one by mistake. A method other than GET, HEAD, or POST is listed as a reason a preflight is needed. A content type other than form data, multipart, or plain text is another reason. The line under the form says it is a simple request, or names how many preflight reasons there are. The server snippet tab opens on Express. A HEAD response does not show a body.

Related tools

More: Developer Tools