Every HTTP status code, ready to test.
Use free HTTP mocking data endpoints to test status codes, redirects, delays, headers, request inspection, GeoIP routing, streaming, response sizes, and content encoding.
- Any code from 100–599
- Plain text or JSON
- GET endpoints
curl --request GET \
--include \
--header "Accept: application/json" \
--header "X-Response: X-Test-Scenario: service-overload" \
"https://mock.httpstatus.codes/status/503?delay=750"const response = await fetch(
"https://mock.httpstatus.codes/status/503?delay=750",
{
headers: {
Accept: "application/json",
"X-Response": "X-Test-Scenario: service-overload",
},
},
);
console.log(response.status);
console.log(response.headers.get("retry-after"));
console.log(await response.json());import requests
response = requests.get(
"https://mock.httpstatus.codes/status/503",
params={"delay": 750},
headers={
"Accept": "application/json",
"X-Response": "X-Test-Scenario: service-overload",
},
)
print(response.status_code)
print(response.headers["Retry-After"])
print(response.json())<?php
$curl = curl_init(
"https://mock.httpstatus.codes/status/503?delay=750"
);
$retryAfter = null;
curl_setopt_array($curl, [
CURLOPT_HTTPHEADER => [
"Accept: application/json",
"X-Response: X-Test-Scenario: service-overload",
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADERFUNCTION => function ($curl, $header) use (&$retryAfter) {
if (stripos($header, "Retry-After:") === 0) {
$retryAfter = trim(substr($header, strlen("Retry-After:")));
}
return strlen($header);
},
]);
$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
echo "Status: {$status}\n";
echo "Retry-After: {$retryAfter}\n";
echo $response;
curl_close($curl);Raw response inspector
See the complete HTTP response.
Inspect the status line, response headers, and body without following redirects. For informational status codes, the interim response is shown before the final response.
Response transcript
Ready
Raw HTTP response
Enter a status code and send the request to inspect its raw HTTP response.
Informational responses, final status lines, response headers, and the response body will appear here.Why use httpstatus.codes?
Built for real HTTP testing.
Reproduce predictable HTTP behavior without changing your backend or maintaining disposable test infrastructure.
Status code reference
Explicitly supported responses.
Every endpoint below accepts GET. Codes with conditional or header-driven behavior are marked with an implementation note.
Need an unregistered code? /status/{code} also returns unknown integer codes from 100 through 599 for testing.
Shared request options
Shape the response.
These options work across the normal status and request endpoints unless an endpoint documents different behavior.
| Option | Accepted value | Purpose | Example |
|---|---|---|---|
delayQuery parameter | 0–60000 ms | Apply a server-side delay before returning the response. | |
X-DelayRequest header | 0–60000 ms | Header alternative to the delay query parameter. | |
X-ResponseRequest header | Name: value, … | Add one or more custom response headers. | |
Custom response headers Pass comma-separated Name: value pairs. Connection, Content-Length, Transfer-Encoding, Upgrade, and Keep-Alive cannot be overridden. curl -i -H 'X-Response: X-Test: hello, Cache-Control: no-store' https://mock.httpstatus.codes/status/200 | |||
AcceptRequest header | application/json | Request JSON where the endpoint supports content negotiation. | |
Request JSON curl -H 'Accept: application/json' https://mock.httpstatus.codes/status/200 | |||
Specialized test endpoints
Purpose-built HTTP test tools.
Test redirects, request data, GeoIP routing, streaming, response sizes, and content encoding with predictable endpoints.
Test URL catalog
Every test route, ready to reuse.
Copy or download
Copy the complete URL catalog or download it for scripts, documentation, and test suites. The JSON version also includes header-driven scenarios.
Import into an API client
Import OpenAPI or Postman into Postman, Insomnia, Bruno, Hoppscotch, Apidog, and RapidAPI Client. After importing, verify that the base URL is https://mock.httpstatus.codes; some clients may omit or replace it. Use the HTTP file directly in compatible editors and API clients, including JetBrains IDEs and VS Code REST Client.
Good to know
Designed to stay predictable.
Responses with a body use text/plain by default. Send Accept: application/json for JSON where supported. Responses such as 204, 205 and 304 intentionally have no body, while client-side redirects return HTML.
The public endpoints use GET. Codes normally associated with resource creation, request bodies, WebDAV operations, or protocol upgrades therefore simulate the response without performing that underlying operation. Implementation notes mark relevant differences.
Yes. Both ?delay= and X-Delay use milliseconds. Client-side meta and Refresh redirects are converted internally so the public API remains consistent.
X-Elapsed-TimeThe elapsed request processing time, rounded to milliseconds. It is intentionally omitted from streaming responses, which start before the complete response has been generated.
Server-TimingReports an applied server-side delay using the standard Server Timing format. It is omitted for client-side redirects.
X-Redirect-BySet to httpstatus.codes on server-side and GeoIP redirect responses so the redirect source is easy to identify.
The endpoint sends its first chunk immediately and spaces later chunks using interval. Some HTTP clients, developer tools, and proxies buffer the response before displaying it, so seeing all chunks together does not necessarily mean the server sent them together. X-Delay is ignored because it would delay the complete stream rather than control the interval between chunks.
The gzip, deflate, br, and zstd endpoints always apply the named Content-Encoding; they do not negotiate through Accept-Encoding. The identity endpoint sends an unencoded body without a Content-Encoding header. Clients may decode compressed bodies automatically, and some tools then hide or remove that header. The server cannot determine whether a client successfully decoded the response. Zstandard support can vary between clients.
A chain can contain 1–25 redirects and use relative or absolute Location headers. Delay applies per hop, but the theoretical total delay for a chain may not exceed 120000 milliseconds. Requests above that limit return 400 Bad Request.
The service allows 120 requests per minute and requires no API key. It is intended for functional tests, not load testing or high-volume production traffic.
Discover the new HttpStatus beta.
Explore the next generation of HttpStatus – the HTTP status code, header, and redirect checker.