randarium
Network

Random HTTP Status Code Generator

Create random HTTP status codes (1xx–5xx) with common reason phrases. Filter by status class (2xx success, 3xx redirect, 4xx client error, 5xx server error) and toggle between bare codes and full "404 Not Found" format.

Also known as: http code · status line · response code

seeded · synthetic data

Presets

Output

No output yet — set your options and hit .
About this tool, tips & examples

What it does

The Random HTTP Status Code Generator produces status codes across the 1xx–5xx classes with their standard reason phrases. Filter to the classes you need — success, redirect, client error, server error, in any combination — and toggle between bare codes (404) and full status lines (404 Not Found). Up to 1,000 per run, seeded.

Common use cases

  • HTTP client testing — response-handling code exercised across the whole status spectrum, not just 200 and 404.
  • Error-path fixtures — 4xx/5xx-only batches (an “Errors” preset) for retry logic, error pages, and alerting rules.
  • Mock servers — varied statuses for stubbed endpoints.
  • Log and dashboard fixtures — realistic status-code distributions for testing analytics and monitoring displays.

Settings

  • Status classes — multi-select across 1xx informational, 2xx success, 3xx redirect, 4xx client error, 5xx server error (presets for mixed, errors-only, and success-only).
  • Include reason phrase404 Not Found vs bare 404.
  • How many — 1 to 1,000 codes, exportable as text, CSV, or JSON.
  • Seed — the same seed and settings regenerate the identical sequence.

Privacy note

Codes are generated locally in your browser and never uploaded — synthetic values for fixtures, not sampled from real traffic.

FAQ

Why test beyond 200/404/500? Because clients meet 301 vs 308 (method preservation!), 429 (rate limits), and 503 with Retry-After in production. Code that pattern-matched three statuses in testing improvises on the rest.

Are the reason phrases standard? They follow the common registry phrases. Note that HTTP/2 dropped reason phrases entirely — worth testing that your client doesn’t require them.

How do the classes differ in one line? 1xx informational, 2xx success, 3xx redirection, 4xx “you messed up,” 5xx “we messed up.” Retry logic should treat 4xx and 5xx very differently — that’s the test to write.