An httpbin alternative with the same routes and more
Swap each httpbin route for its match, with the field names that change.
Examples last run against the API on
If you use httpbin to see what your HTTP client sends, every common httpbin route has a match at https://api.testingapis.com: echo, status codes, redirects, cookies, auth, compression and streaming. It's free, needs no key and allows requests from any origin. The same host also has things httpbin doesn't, such as saved records, a real rate limiter and a retry target. If you need to run it on your own machine, keep httpbin, which ships as a Docker image.
Route mapping
We sent a request to every route in the right-hand column on 1 November 2026.
| httpbin | testingapis.com |
|---|---|
/get | /api/echo |
/post, /put, /patch, /delete | /api/echo |
/anything/x | /api/echo/x |
/headers | /api/echo/headers |
/ip | /api/echo/ip |
/user-agent | /api/echo/user-agent |
/status/418 | /api/status/418 |
/delay/2 | /api/echo?delay=2 |
/redirect/2 | /api/redirect/2 |
/cookies | /api/cookies |
/basic-auth/user/pass | /api/auth/basic/user/pass |
/bearer | /api/auth/bearer |
/gzip, /deflate, /brotli | /api/formats/gzip, /deflate, /brotli |
/json, /xml, /html | /api/formats/json, /xml, /html |
/image/png | /api/formats/png |
/bytes/8 | /api/files/bytes/8 |
/stream/2 | /api/stream/ndjson/2 |
/drip | /api/stream/drip |
/cache/60 | /api/cache/max-age/60 |
/etag/x | /api/cache/etag |
/uuid | /api/utils/uuid |
Field names in the echo response
The echo response carries the same information under different names, so a test that reads httpbin's JSON needs these changes: args becomes query, data becomes body, and origin becomes client.ip. headers and json keep their names.
$ curl -X POST "https://api.testingapis.com/api/echo?a=1" \
-H "Content-Type: application/json" -d '{"a":1}'
{
"method": "POST",
"url": "https://api.testingapis.com/api/echo?a=1",
"path": "/api/echo",
"query": { "a": "1" },
"headers": { ... },
"cookies": {},
"contentType": "application/json",
"contentLength": 7,
"body": "{\"a\":1}",
"json": { "a": 1 },
"client": { "ip": "...", ... }
}/api/echo?a=1Auth checks
Basic auth works the same way: the user and password in the path are what the request must send.
$ curl -u user:pass https://api.testingapis.com/api/auth/basic/user/pass
{"authenticated":true,"scheme":"basic","user":"user"}
$ curl -i https://api.testingapis.com/api/auth/basic/user/pass
HTTP/1.1 401 UnauthorizedThe auth test endpoints guide covers JWT, OAuth, API keys and HMAC signing.
What the same host adds
- Records you can create, edit and delete, with validation errors.
- A rate limiter that sends a real 429 with
Retry-Afteron the sixth request in a minute. - Chaos routes, including one that fails three times and then succeeds, so a retry loop has something to pass.
- WebSocket echo, GraphQL and SOAP.
Comparing data APIs instead? See free fake APIs compared.