CORS Tester.
Simulate a browser's CORS preflight and request from a given origin and see why it passes or fails.
Uses serverAbout CORS Tester
CORS Tester reproduces what a browser does when JavaScript on one origin calls an API on another, and explains the result header by header. Enter the API URL, the origin of the calling page (for example https://app.example.com), the method and any custom request headers. If the request is not "simple" (a method other than GET, HEAD or POST, or headers such as Authorization, Content-Type: application/json or X-Api-Key), the tool first sends the OPTIONS preflight with Origin, Access-Control-Request-Method and Access-Control-Request-Headers, then checks the status, Access-Control-Allow-Origin, Allow-Methods, Allow-Headers, Allow-Credentials and Max-Age. For GET and HEAD it also sends the actual request and checks its headers; other methods are never sent, so the test cannot change data. A typical failure: the preflight returns 401 because the server demands a token on OPTIONS too, or it answers Access-Control-Allow-Origin: * while the page sends cookies, which browsers reject. Other common mistakes are listing several origins in one header, forgetting Vary: Origin when the allowed origin is echoed, and expecting "*" in Allow-Headers to cover Authorization. The optional Authorization value is never cached or logged. Because the request comes from our server, network rules that depend on the visitor's IP can differ.
How to Use
- Enter the API URL and the origin of the page that calls it.
- Pick the method, list custom request headers and turn on credentials if the page sends cookies.
- Read the verdict and fix the first failed check on the server.
Frequently Asked Questions
Why does the tool not send my POST, PUT or DELETE request?
To avoid changing data on your server. It sends the preflight for those methods, which is what usually fails, and reports that the real response also needs Access-Control-Allow-Origin.
Why does "*" not work with credentials?
Browsers refuse a wildcard origin, methods or headers when the request includes cookies or HTTP authentication. The server must echo the exact origin and send Access-Control-Allow-Credentials true.
Is Content-Type treated as a simple header?
Only form encodings and text/plain are simple. APIs usually send application/json, which needs a preflight, so the tester treats Content-Type as a custom header.
Is my Authorization header stored?
No. Results of this tool are never cached, inputs are never logged, and the page keeps the value out of the URL.
Related Tools
See the response headers, status code and redirects of any URL.
Grade a site's HSTS, CSP, X-Frame-Options, Referrer-Policy and other security headers.
Build HTTP requests and generate code in cURL, PHP, JS, and Python.
Convert curl commands to PHP, JavaScript, or Python code.
Decode, inspect, and verify JSON Web Tokens.
Hash and verify passwords with bcrypt or Argon2.