Skip to main content
HttpStatus.codes
Free · No API key

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
fetch.js
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());

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.

mock.httpstatus.codes/status/

https://mock.httpstatus.codes/status/102

Popular status codes

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.

Built for real HTTP testing.

Reproduce predictable HTTP behavior without changing your backend or maintaining disposable test infrastructure.

Test error handling
Verify how your application handles simulated 4xx and 5xx responses, including authentication failures, rate limits, and temporary unavailability.
Validate redirect behavior
Test redirect chains, loops, redirect status codes, and client-side redirects without configuring additional infrastructure.
Reproduce slow responses
Add a controlled delay to exercise loading states, client-side timeouts, cancellation, and retry logic.
Inspect HTTP clients
See the headers, IP information, user agent, and request data that actually reach the service.
Test location-based redirects
Verify how your client handles GeoIP redirects, or use a country override to reproduce location-specific flows predictably.
Test response delivery
Verify streaming, buffering, fixed response sizes, and support for compressed or unencoded response bodies.

Explicitly supported responses.

Every endpoint below accepts GET. Codes with conditional or header-driven behavior are marked with an implementation note.

63 registered endpoints

Need an unregistered code? /status/{code} also returns unknown integer codes from 100 through 599 for testing.

Shape the response.

These options work across the normal status and request endpoints unless an endpoint documents different behavior.

Shared request options, accepted values, and purposes
OptionAccepted valuePurposeExample
delay

Query parameter

0–60000 ms

Apply a server-side delay before returning the response.

X-Delay

Request header

0–60000 ms

Header alternative to the delay query parameter.

X-Response

Request header

Name: value, …

Add one or more custom response headers.

Accept

Request header

application/json

Request JSON where the endpoint supports content negotiation.

Purpose-built HTTP test tools.

Test redirects, request data, GeoIP routing, streaming, response sizes, and content encoding with predictable endpoints.

GET
Redirect chains
Create a controlled chain of 1–25 server-side redirects.
/redirect/{count}
  • code: 301, 302, 303, 307 or 308 (default 307)
  • to: internal /status/{code} route
  • delay: 1–60000 ms per hop; max 120000 ms total
  • location: relative (default) or absolute
https://mock.httpstatus.codes/redirect/3?location=absolute&code=302&to=/status/404
GET
Redirect loop
Test loop detection as two routes continuously redirect to each other.
/redirect-loop/a/redirect-loop/b
https://mock.httpstatus.codes/redirect-loop/a
GET
Client-side redirects
Return a 200 HTML document that makes the browser navigate.
/client-redirect/meta/client-redirect/js/client-redirect/refresh
  • to: internal /status/{code} route
  • delay: browser delay in milliseconds
  • method: location, href, assign or replace (JS only)
https://mock.httpstatus.codes/client-redirect/js?to=/status/404&method=replace&delay=1000
GET
Request inspection
Return selected request data or inspect everything that reached the service.
/request/ip/request/user-agent/request/anything/request/anything/{path}/request/headers
https://mock.httpstatus.codes/request/anything/test?hello=world
GET
GeoIP redirects
Resolve the client country with MaxMind and redirect to its country-specific response.
/geo/geo?country=nl
  • country: ISO 3166-1 alpha-2 override
https://mock.httpstatus.codes/geo?country=nl
GET
Streaming responses
Send 1–20 text chunks with a controlled interval between each chunk.
/stream/{chunks}
  • chunks: 1–20
  • interval: 0–1000 ms (default 250 ms)
  • the first chunk is sent immediately
  • maximum span: 19 seconds
https://mock.httpstatus.codes/stream/5?interval=500
GET
Response size
Return an exact, deterministic number of bytes for size and download tests.
/bytes/{size}
  • size: 0–1048576 bytes
  • content type: application/octet-stream
  • supports delay and X-Delay
https://mock.httpstatus.codes/bytes/65536
GET
Response compression
Test fixed content encodings and an explicitly unencoded response.
/encoding/gzip/encoding/deflate/encoding/br/encoding/zstd/encoding/identity
  • gzip, deflate, Brotli and Zstandard
  • identity: no Content-Encoding header
  • clients may decompress responses automatically
https://mock.httpstatus.codes/encoding/br

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.

TXT JSON

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.

Designed to stay predictable.

Discover the new HttpStatus beta.

Explore the next generation of HttpStatus – the HTTP status code, header, and redirect checker.

Visit the beta