REST API Tester
Send GET, POST, PUT, PATCH and DELETE requests from your browser, read status, timing and headers, and import or export the request as cURL.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the REST API Tester?
The REST API Tester sends a real HTTP request from your browser to the URL you enter and shows what came back: the status code, how long the round trip took, the response body (pretty-printed when it is JSON) and the response headers the browser lets the page read. Pick a method, add headers in a form or as JSON, type a body, and press Send Request.
Every request also becomes a cURL command you can copy, and you can paste a cURL command (including the multi-line one Chrome and Firefox produce with "Copy as cURL") to fill the form. That makes it a quick bridge between a terminal, your browser DevTools and an API you are poking at.
Because the request is made by your browser, the browser's rules apply. The API must allow cross-origin calls with CORS, a page served over HTTPS cannot call a plain http:// URL, and a few headers such as Host, Cookie and Origin cannot be set by any web page. When a request is blocked, the tool says why and points you to the cURL command, which has none of those limits.
- Real requests with fetch, not simulated responses
- Status code, round-trip time, pretty-printed JSON and readable response headers
- Headers as a form or as JSON
- Import and export cURL, with correct shell quoting
- Clear explanations for CORS, mixed-content and forbidden-header failures
Updated
How to use the REST API Tester
- Choose the method (GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS) and type the full URL, starting with https://.
- Add headers with the Form tab (pick a header name, then its value) or switch to the JSON tab and paste an object such as {"Authorization": "Bearer ..."}.
- For POST, PUT and PATCH, put the payload in Request Body. GET and HEAD are sent without a body.
- Press Send Request. Read the status, time in milliseconds, the Response Body tab and the Response Headers tab.
- Use Copy as cURL to rerun the same request in a terminal, or Import cURL to load a command copied from DevTools.
Worked examples
Load the sample request
Input
GET https://jsonplaceholder.typicode.com/users
Output
Status 200, a JSON array of 10 users, and a cURL command: curl \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'User-Agent: API-Tester/1.0' \ 'https://jsonplaceholder.typicode.com/users'
Load Sample fills in a public test API that allows CORS. The browser does not send the Content-Type header on a GET with no body, which avoids a needless preflight; the cURL command keeps every header you typed.
Import a request from DevTools
Input
curl 'https://api.example.com/v1/items' -H 'accept: application/json' --data-raw '{"name":"pen"}'Output
Method POST, URL https://api.example.com/v1/items, header Accept: application/json, body {"name":"pen"}The command has data and no -X flag, so it is treated as POST, which is what curl itself does.
Background and insight
HTTP methods are defined in RFC 9110 (2022), which replaced the older RFC 7231. GET, HEAD and OPTIONS are "safe": they should not change anything on the server. PUT and DELETE are idempotent, so sending the same request twice leaves the server in the same state as sending it once. POST is neither, which is why browsers warn before resubmitting a form and why payment APIs ask for an idempotency key on POST.
CORS (Cross-Origin Resource Sharing) is the part people trip over. A page on one origin can only read a response from another origin if that server answers with an Access-Control-Allow-Origin header that matches. Requests that use methods other than GET, HEAD and POST, or headers outside a short safelist (Content-Type: application/json counts as outside), first trigger an OPTIONS "preflight" request. If the server does not answer the preflight correctly, your real request is never sent. This is a browser rule, not a server error, so the same call works fine from curl or Postman.
Even when CORS allows the response, the page can only read a handful of response headers (Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified and Pragma) unless the server lists more in Access-Control-Expose-Headers. If the Response Headers tab looks short, that is the reason.
Common use cases
Checking an endpoint before writing code
Confirm the URL, auth header and response shape of a third-party API before you wire it into an app.
Debugging CORS
If the request works in curl but fails here, the API is missing CORS headers for browser clients, which is exactly what your frontend will hit.
Turning DevTools requests into scripts
Paste a "Copy as cURL" command, tweak the body, send it, then copy the cleaned-up cURL into a shell script or ticket.
Sharing a reproducible request
Copy the generated cURL into a bug report so a backend engineer can run the exact call.
Tips and limitations
- A "Failed to fetch" error with no status code means the browser blocked the call or could not connect. Check CORS, the URL and whether you are calling http:// from this HTTPS page.
- Header values are sent in plain text. Do not paste production secrets into any tool you would not paste into curl on a shared machine, and rotate tokens you have shared in screenshots.
- fetch follows redirects automatically, so a 301 or 302 shows up as the final page's status. Use curl -i to see the redirect itself.
- Host, Cookie, Origin, Referer, Connection and Accept-Encoding are set by the browser and cannot be overridden here; the tool tells you when it drops one.
- Cookies for the target site are not sent, because the request uses the default credentials mode, which omits them on cross-origin calls.
Sources and further reading
- RFC 9110: HTTP Semantics, IETF. Methods, safety, idempotency and status codes
- Fetch Standard, WHATWG. The CORS protocol, preflight and safelisted headers browsers follow
- Cross-Origin Resource Sharing (CORS), MDN Web Docs. Simple versus preflighted requests, explained with examples
- CORS-safelisted response header, MDN Web Docs. The seven headers a page can always read
- Access-Control-Expose-Headers, MDN Web Docs
Frequently asked questions
Why does my API call work in curl but fail in the REST API Tester?
Because browsers enforce CORS and curl does not. The server has to send Access-Control-Allow-Origin for this site, and answer the OPTIONS preflight if you use JSON bodies or custom headers. Your own frontend will hit the same wall, so the fix belongs on the API.
Are my requests sent through a RedBison server?
No. Your browser sends the request directly to the URL you typed, and the response comes straight back to the page. Nothing is proxied or logged by this site, which is also why browser rules like CORS apply.
Can I send a body with a GET request here?
No, browsers refuse a body on GET and HEAD, so the tool leaves it out and tells you. RFC 9110 says a GET body has no defined meaning, and many servers and proxies drop it. Use POST, or put the data in query parameters.
Why are some response headers missing?
For cross-origin responses a page can only read seven safelisted headers unless the server names others in Access-Control-Expose-Headers. Headers like X-RateLimit-Remaining or ETag are often there on the wire but hidden from JavaScript. curl -i shows all of them.
How do I copy a request from Chrome DevTools into this tool?
In the Network tab, right-click the request, choose Copy, then Copy as cURL (bash). Click Import cURL here, paste it and press Import. The method, URL, headers and body are filled in; custom headers open in the JSON editor.
Does the API tester support authentication?
Yes, as headers. Add Authorization with a value like "Bearer <token>", or an API key header such as X-API-Key. A curl command with -u user:password is converted to a Basic Authorization header when you import it.
Is there an in-depth guide to the REST API Tester?
Yes. “Testing REST APIs from the Browser: Methods, cURL and CORS” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.