Logo

CORS Tester

Test cross-origin resource sharing headers for any URL. Inspect the preflight OPTIONS response and see exactly what's blocking your requests.

Comma-separated list of headers your client sends.

About the Tool

If you build web apps, you know the pain of cross-origin resource sharing errors. You make a fetch request, and the browser throws a red wall of text in your console. Our cors tester fixes this. It acts as an independent proxy that runs the exact same preflight checks your browser does, but actually shows you what went wrong instead of just blocking the connection.

Server-side, not browser-side. Requests are sent from a serverless function rather than from your browser tab. That matters: a browser-based tester is itself subject to the Same-Origin Policy, so a failing request is blocked before it can report anything useful. Sending server-side means every response header comes back intact — including the ones on a request your browser would have refused outright.

We built this because debugging Access-Control-Allow-Origin issues blindly takes far too long. You need a fast way to test cors headers online without browser extensions or Postman. This utility sends the OPTIONS request, reads the raw response headers, and names the exact server change to make.

One honest limit: we test what the server returns to us. If your API varies its response by cookie or session, our result reflects an unauthenticated request rather than yours.

How to Use

Testing your endpoint takes just three quick steps.

  1. Drop in your URL: Paste the full endpoint you want to test into the Target URL box.
  2. Set your Origin: Type the URL of the frontend app that is trying to make the request (like https://localhost:3000).
  3. Run the test: Hit the button. The tool sends a preflight OPTIONS request followed by your chosen HTTP method.

You'll immediately see a pass, fail, or warning verdict. If something fails, open the check card to see exactly how to fix your server config.

Privacy & Security

Here's the thing — testing APIs sometimes involves sensitive endpoints. Your security matters.

When you use this tool, your request routes through a secure serverless function that acts as a pass-through proxy. We do not log your endpoints, we do not store your custom headers, and we never save your API responses. The data exists in memory just long enough to test the CORS policy and send the results back to your screen. The moment you close the tab, the test is gone permanently.

Features

Most tools just ping a URL and check for a 200 OK. This one digs deeper to catch the edge cases that actually break your app.

  • Preflight Analysis: Automatically sends an OPTIONS request to check what your server permits before the real request fires.
  • Credential Validation: Checks if your server safely allows cookies or authorization headers without using the dangerous wildcard origin.
  • Vary Header Detection: Ensures your caching layers won't accidentally serve a CORS response to the wrong domain.
  • Raw Header Inspection: Gives you full visibility into the raw response headers so you can verify exactly what your server sent back.

Technical Specifications

For the developers who want to know how the testing engine works under the hood.

Check ComponentSpecification
Request EngineServer-side proxy bypass
Methods TestedOPTIONS (Preflight) + Selected Method
Origin MatchingStrict string comparison vs Access-Control-Allow-Origin
Credential CheckValidates Access-Control-Allow-Credentials flag
Header ValidationCross-checks requested vs allowed headers

CORS Response Header Reference

Every CORS decision a browser makes comes down to these six response headers. This tool checks all of them.

HeaderWhat it doesExample value
Access-Control-Allow-OriginThe single origin allowed to read the response. Must match the requesting origin exactly, or be *.https://app.example.com
Access-Control-Allow-MethodsHTTP methods permitted for the actual request. Returned on the preflight response.GET, POST, PUT, DELETE
Access-Control-Allow-HeadersRequest headers the client is allowed to send. Anything not listed here fails preflight.Content-Type, Authorization
Access-Control-Allow-CredentialsAllows cookies and auth headers. Cannot be combined with a wildcard origin — you must echo the exact origin.true
Access-Control-Max-AgeHow long, in seconds, the browser may cache the preflight result instead of re-sending OPTIONS.86400
Access-Control-Expose-HeadersResponse headers JavaScript is allowed to read. Without it, only a small safelist is visible.X-Request-Id, X-Total-Count

Plus one that is not an Access-Control-* header: Vary: Origin. If your server echoes the request origin, you must also send Vary: Origin so caches and CDNs do not serve one origin's CORS response to another.

Where to Go Next

Most people arrive here mid-error. These walk through the three failures we see most:

Want the background rather than the fix? Start with what CORS is and why browsers enforce it, then how preflight requests work. The full CORS headers reference covers every Access-Control value in one table.

Other Tools for the Same Debugging Session

CORS is rarely the only thing going wrong. Three that pair naturally with this one:

  • HTTP headers checker — see every response header, not just the CORS ones.
  • API tester — send a full request with a body and auth once the headers are right.
  • Webhook tester — inspect what a third-party service actually sends you.

Frequently Asked Questions

Why does my request work in Postman but fail in the browser?

+
Postman is a desktop app, so it ignores CORS policies completely. Browsers actively enforce CORS to stop malicious scripts from reading your data. That is why you need a dedicated tester to verify the headers.

What is a preflight request?

+
A preflight is a quick OPTIONS request the browser sends before a complex request, such as a POST with JSON. It asks the server whether the real request is permitted. If the server does not reply with the right Access-Control headers, the browser cancels the real request.

Can I just set my origin to a wildcard (*)?

+
You can, but there's a catch. If you use a wildcard, browsers will not let you send credentials like cookies or secure auth tokens. If your app requires users to log in, you must specify the exact origin.

Why do I need the Vary: Origin header?

+
If you don't use this header, a CDN might cache a response meant for site A and accidentally serve it to site B. This causes random CORS errors that are a nightmare to debug. This tool automatically checks if you've set it correctly.

The tester says my headers are correct but the browser still blocks me. Why?

+
Check what your server does on an error response. Many frameworks add CORS headers in middleware that never runs when a route throws a 500, so the error arrives with no headers and the browser hides the real message. Test a failing route, not just a working one.

Why does my request work on localhost but break in production?

+
Usually a protocol or port mismatch. An origin is scheme plus host plus port, so http://example.com and https://example.com are different origins entirely, and so is a different port on the same host. Echo the exact origin your app sends.

Can a CORS error hide a redirect?

+
Yes, and this one wastes hours. A 301 or 302 during a preflight is not allowed at all, so the browser aborts and reports a generic CORS failure. Test the final URL rather than the one that redirects.

My custom header is rejected even though the origin is allowed. What now?

+
Every non-standard request header has to be named in Access-Control-Allow-Headers. Adding something like X-Request-Id or a bearer token triggers a preflight that will fail unless the server lists it. The header name is case-insensitive but must be present.

Does Access-Control-Max-Age actually help?

+
It can cut a lot of round trips, since the browser caches the preflight result instead of re-asking. Be aware that browsers cap it — Chrome limits it to two hours regardless of what you send. A very large value is silently reduced.

Is CORS a security feature that protects my API?

+
No, and this is a common misunderstanding. CORS protects users from a malicious page reading responses in their browser. It does nothing against a script, a proxy, or anything that is not a browser, so your API still needs real authentication.

Related Tools You Might Like

Advertisement