FormatterHQ

API Tester (Online REST Client)

Send HTTP requests to REST APIs directly from your browser. Write the request as plain text, then inspect the status, timing, headers and formatted response body.

Input TEXT
Output JSON
Ready.

How to use the API Tester (REST Client)

  1. Write the request line, such as POST https://api.example.com/items, or enter the URL in the URL field.
  2. Add headers on the following lines (Name: value), then a blank line and the request body if needed.
  3. Send the request and read the status code, response time, size, headers and pretty-printed body.
  4. Use Copy as cURL to reproduce the same request in a terminal or share it.

An API tester: a lightweight REST client in the browser

Desktop tools like Postman and Insomnia are powerful, but for a quick check of an endpoint you do not always want to install software or sign in. This API tester lets you write a request in a simple text format, send it with the browser's fetch API and inspect everything that comes back. JSON responses are pretty-printed automatically.

Request format

POST https://jsonplaceholder.typicode.com/posts
Content-Type: application/json
Accept: application/json

{
  "title": "Hello from the API tester",
  "body": "It works",
  "userId": 1
}
  • First line – the method and URL (the method is optional; GET is used without a body, POST with one). You can also use the separate URL and method fields.
  • Headers – one per line as Name: value.
  • Body – everything after the first blank line.
  • Lines starting with # or // before the request line are comments.

This is the same style used by the ".http" files of popular editor extensions, so requests are easy to copy between them.

What you see in the response

  • The status code and text, colored green for 2xx, amber for 3xx and red for errors.
  • Response time in milliseconds and body size.
  • All response headers the browser is allowed to read.
  • The body, formatted as JSON when possible, otherwise shown as HTML, XML or text.

Redirects are followed automatically, and a configurable timeout (1–300 seconds, default 30) stops requests that hang.

The CORS limitation

Because requests are sent by your browser, they follow the browser's security rules. The target server must allow cross-origin requests with CORS headers (Access-Control-Allow-Origin), otherwise the browser blocks the response and the tool reports that the request failed before a response was received. Also:

  • Only response headers exposed by the server's CORS configuration are visible.
  • Browsers do not let scripts set certain headers, such as Cookie, Host or Origin.
  • Cookies are not sent (credentials: 'omit'), so authenticate with headers such as Authorization: Bearer ….
  • APIs on localhost work only if they send CORS headers; plain http:// targets may be blocked as mixed content.

If an API does not support CORS, click Copy as cURL and run the command in a terminal, where no such restrictions apply. You can also turn that command into code with cURL to Python or cURL to JavaScript.

Good APIs for practicing

Public test APIs such as JSONPlaceholder (fake posts and users), httpbin-style echo services and many open-data APIs allow CORS and are ideal for learning how methods, headers and status codes behave. Try sending the same request as GET and POST, remove a required header, or send invalid JSON, and compare the status codes you get back: 200 and 201 for success, 400 or 422 for bad input, 401 and 403 for authentication problems, 404 for a wrong URL.

Privacy and security

Requests go directly from your browser to the API you specify; they do not pass through this website's servers. Still, treat tokens with care: use test credentials where possible and revoke keys you have pasted into shared computers.

To explore a large JSON response further, paste it into the JSON viewer.

Frequently asked questions

Why do I get a CORS error or "request failed"?
The API does not allow requests from web pages on other origins. Browsers block such responses. Use Copy as cURL and run the request from a terminal, or test from your own back end.
Are my requests sent through your server?
No. The browser sends each request directly to the API you enter, and the response is displayed locally.
How do I send a JSON body?
Add a Content-Type: application/json header, leave one blank line after the headers and type the JSON body below it. With a body present, POST is used unless you specify another method.
Can I send cookies?
No. Browsers do not allow pages to set the Cookie header, and the tester does not send your cookies. Use token-based authentication headers instead.
Is this a replacement for Postman?
For quick, one-off requests, yes. Postman and similar desktop tools add collections, environments, scripting and requests without CORS limits, which matter for larger projects.

Last updated September 26, 2026

Guides

Related tools

JavaScript Tester Run JavaScript online and see console.log, warnings, errors and tables instantly in a safe, sandboxed browser console. JSONPath Tester Test JSONPath expressions online against your JSON. Supports filters, wildcards, recursive descent and slices, returning values or paths. Regex Tester Test JavaScript regular expressions live: highlight matches, inspect capture groups and named groups, try flags and preview replacements. Responsive Website Tester Preview any website on phone, tablet, laptop and desktop screen sizes side by side to check your responsive design. XPath Tester Test XPath expressions online against your XML. See matched nodes, attributes, strings, numbers or booleans instantly. Barcode Generator Generate Code 128, EAN-13, UPC-A, Code 39, ITF-14, ISBN, Data Matrix, PDF417 and more barcodes. Download PNG or SVG for free. Basic Auth Header Generator Build an HTTP "Authorization: Basic" header from username:password, or decode an existing Basic auth header back to credentials. Broken Link Checker Find broken links on a web page: every link is checked and 404s, errors and redirects are listed. Chmod Calculator Convert Linux file permissions between octal (755) and symbolic (rwxr-xr-x) with checkboxes, including setuid, setgid and sticky bits. Cron Expression Parser Translate cron expressions into plain English and list the next 10 run times. Supports macros, seconds fields and Quartz syntax. Crontab Generator Build a crontab line from presets or custom fields, with a plain-English explanation and a preview of the next run times. Content Security Policy Evaluator Parse a Content-Security-Policy header and flag risky directives such as unsafe-inline, wildcards, missing object-src and base-uri.