Mock HTTP Status Generator

Runs in browser Mocking

Choose a status code to get a realistic raw HTTP response (status line, headers, JSON or HTML body) to use in stubs, docs and client tests.

TEST DATA ONLY — all generated names, contacts, identifiers and numbers are synthetic and do not belong to real people or accounts.
Privacy: This tool runs entirely in your browser. Your input never leaves your device.
Loading tool…

What are HTTP status codes?

An HTTP status code is the three-digit number a server returns with every response to say how the request went: 2xx success, 3xx redirection, 4xx a client-side problem (400 bad request, 401 unauthenticated, 403 forbidden, 404 not found, 429 too many requests), 5xx a server-side failure. The meanings are defined in RFC 9110 and RFC 6585, and an API that uses them precisely is far easier to test and to monitor.

Read the guide: HTTP Status Codes Explained

How to use Mock HTTP Status Generator

  1. Type the status code (e.g. 404 or 429).
  2. Choose the body style and optionally a resource name.
  3. Generate and copy the raw HTTP response or just the body.

Mock HTTP Status Generator features

  • Any status code 100–599 with status-specific bodies and headers for ~40 common codes
  • Auto body selection: JSON for success, RFC 9457 problem+json for errors
  • HTML error page, plain text or bodyless variants
  • Correct handling of 1xx, 204 and 304 (no body) and redirect Location headers
  • Explanation panel: class, meaning, retry guidance and cacheability

Mock HTTP Status Generator example

Rate-limited response

Input:

429

Output:

HTTP/1.1 429 Too Many Requests
Retry-After: 30
RateLimit-Limit: 100
RateLimit-Remaining: 0
Content-Type: application/problem+json

{ "type": "https://api.example.com/problems/too-many-requests", "title": "Too Many Requests", "status": 429, "detail": "Rate limit of 100 requests per minute exceeded. Retry in 30 seconds.", "retryAfter": 30 }

Frequently asked questions about Mock HTTP Status Generator

Which status codes are supported?

Any code from 100 to 599. Around forty common codes have rich, status-specific bodies and headers (Location for 201/3xx, Retry-After for 429/503, WWW-Authenticate for 401, Allow for 405); others get a generic body.

Which body formats can I choose?

Auto picks JSON for success and RFC 9457 problem+json for errors; you can force JSON, problem+json, an HTML error page, plain text or no body at all.

Why is 204 empty?

204, 304 and 1xx responses must not carry a body according to RFC 9110; the mock reflects that so your client handles them correctly.

Can I test how my client handles the status?

Yes — pair the generated response with a stub server, or use the Status Code Simulator in the API testing tools for a live endpoint.

References