Developer Utilities
HTTP Status Codes List
A complete list of HTTP response codes from 1xx to 5xx. Search the reference, or scroll the full table below — every HTTP status code has its meaning, typical causes and a direct link (for example #404).
Loading Utility…
HTTP Status Codes List
Every standard HTTP response code from 1xx to 5xx, with what it means and when you will see it.
1xx Informational
| Code | Name | Meaning | |
|---|---|---|---|
| 100 | Continue | The server has received the request headers and the client should proceed to send the request body. | Commonly used in large file uploads. |
| 101 | Switching Protocols | The requester has asked the server to switch protocols. | Used when upgrading to WebSockets. |
| 102 | Processing | Server has received and is processing the request, but no response is available yet. | WebDAV specific. |
| 103 | Early Hints | Lets the server send preliminary response headers (usually Link preload hints) before the final response. | Used to start loading CSS and fonts while the server is still rendering. |
2xx Success
| Code | Name | Meaning | |
|---|---|---|---|
| 200 | OK | Standard response for successful HTTP requests. | The gold standard for a working endpoint. |
| 201 | Created | The request has been fulfilled and has resulted in a new resource being created. | Typical response for a successful POST request. |
| 202 | Accepted | The request has been accepted for processing, but the processing has not been completed. | Used for asynchronous operations. |
| 203 | Non-Authoritative Information | The request succeeded, but the returned metadata was modified by a transforming proxy. | Rare; seen behind some proxies and CDNs. |
| 204 | No Content | The server successfully processed the request and is not returning any content. | Common for successful DELETE or PUT updates. |
| 205 | Reset Content | The request succeeded and the client should reset the document view, such as clearing a form. | No response body is sent. |
| 206 | Partial Content | The server is delivering only part of the resource due to a range header sent by the client. | Used by video players and download managers. |
| 207 | Multi-Status | Conveys status for multiple independent operations in one XML body. | WebDAV specific. |
| 208 | Already Reported | Members of a DAV binding were already enumerated earlier in the response. | WebDAV specific. |
| 226 | IM Used | The server fulfilled a GET with instance manipulations applied to the current instance. | Delta encoding (RFC 3229). |
3xx Redirection
| Code | Name | Meaning | |
|---|---|---|---|
| 300 | Multiple Choices | The resource has several representations and the client may choose one. | Rarely used in practice. |
| 301 | Moved Permanently | This and all future requests should be directed to the given URI. | Critical for SEO when changing URLs. |
| 302 | Found | The resource was found, but at a different URI temporarily. | Temporary redirection. |
| 303 | See Other | The response to the request can be found at another URI using GET. | The standard redirect after a form POST (Post/Redirect/Get). |
| 304 | Not Modified | Indicates that the resource has not been modified since the version specified by the request headers. | Key for browser caching and performance. |
| 307 | Temporary Redirect | The request should be repeated with another URI; however, future requests should still use the original URI. | Preserves the HTTP method of the original request. |
| 308 | Permanent Redirect | The request and all future requests should be repeated using another URI. | Modern alternative to 301 that preserves HTTP method. |
4xx Client Error
| Code | Name | Meaning | |
|---|---|---|---|
| 400 | Bad Request | The server cannot or will not process the request due to something that is perceived to be a client error. | Often caused by malformed JSON or invalid parameters. |
| 401 | Unauthorized | Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. | Check your Bearer tokens or API keys. |
| 402 | Payment Required | Reserved for future use; some APIs use it when a payment or quota is required. | Used by some SaaS APIs for billing failures. |
| 403 | Forbidden | The request was valid, but the server is refusing action. The user might not have the necessary permissions. | Authenticated but not authorized. |
| 404 | Not Found | The requested resource could not be found but may be available in the future. | The most common error on the web. |
| 405 | Method Not Allowed | A request method is not supported for the requested resource. | E.g., trying to POST to a GET-only endpoint. |
| 406 | Not Acceptable | The server cannot produce a response matching the Accept headers sent by the client. | Check the Accept header. |
| 407 | Proxy Authentication Required | The client must first authenticate itself with the proxy. | Corporate proxies return this. |
| 408 | Request Timeout | The server timed out waiting for the request. | Client took too long to send the full request. |
| 409 | Conflict | Indicates that the request could not be processed because of conflict in the current state of the resource. | Common in version control or unique constraint violations. |
| 410 | Gone | The resource is no longer available and will not be available again. | Tells search engines to drop a URL faster than 404. |
| 411 | Length Required | The request did not specify a Content-Length, which the server requires. | Set Content-Length on the request body. |
| 412 | Precondition Failed | A precondition in the request headers (such as If-Match) evaluated to false. | Used for optimistic concurrency with ETags. |
| 413 | Content Too Large | The request body is larger than the server is willing to process. | Raise client_max_body_size in Nginx for uploads. |
| 414 | URI Too Long | The URI provided was too long for the server to process. | Move large query data into a POST body. |
| 415 | Unsupported Media Type | The request body format is not supported by the server. | Usually a missing or wrong Content-Type header. |
| 416 | Range Not Satisfiable | The client asked for a portion of the file the server cannot supply. | Range header beyond the end of the file. |
| 417 | Expectation Failed | The server cannot meet the requirements of the Expect request header. | Related to Expect: 100-continue. |
| 418 | I'm a teapot | An April Fools joke from RFC 2324; the server refuses to brew coffee because it is a teapot. | Not meant for real APIs. |
| 421 | Misdirected Request | The request was directed at a server that cannot produce a response for it. | Seen with HTTP/2 connection reuse across hosts. |
| 422 | Unprocessable Entity | The request was well-formed but was unable to be followed due to semantic errors. | Standard for validation errors in modern APIs. |
| 423 | Locked | The resource being accessed is locked. | WebDAV specific. |
| 424 | Failed Dependency | The request failed because it depended on another request that failed. | WebDAV specific. |
| 425 | Too Early | The server is unwilling to process a request that might be replayed. | Related to TLS 1.3 early data. |
| 426 | Upgrade Required | The client should switch to a different protocol, given in the Upgrade header. | For example, forcing TLS or a newer HTTP version. |
| 428 | Precondition Required | The server requires the request to be conditional. | Prevents lost updates; send If-Match. |
| 429 | Too Many Requests | The user has sent too many requests in a given amount of time. | Rate limiting is active. |
| 431 | Request Header Fields Too Large | The server refuses the request because its header fields are too large. | Often caused by oversized cookies. |
| 451 | Unavailable For Legal Reasons | The resource is unavailable due to a legal demand, such as government censorship. | A reference to Fahrenheit 451. |
5xx Server Error
| Code | Name | Meaning | |
|---|---|---|---|
| 500 | Internal Server Error | A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. | The server crashed or hit an unhandled exception. |
| 501 | Not Implemented | The server either does not recognize the request method, or it lacks the ability to fulfil the request. | Endpoint is planned but not coded yet. |
| 502 | Bad Gateway | The server was acting as a gateway or proxy and received an invalid response from the upstream server. | Common in Nginx/Apache proxy setups. |
| 503 | Service Unavailable | The server cannot handle the request (because it is overloaded or down for maintenance). | Use this for planned downtime to help SEO. |
| 504 | Gateway Timeout | The server was acting as a gateway or proxy and did not receive a timely response from the upstream server. | Backend is taking too long to process. |
| 505 | HTTP Version Not Supported | The server does not support the HTTP version used in the request. | Very rare in modern stacks. |
| 506 | Variant Also Negotiates | Transparent content negotiation resulted in a circular reference. | Server misconfiguration. |
| 507 | Insufficient Storage | The server is unable to store the representation needed to complete the request. | WebDAV specific; disk full. |
| 508 | Loop Detected | The server detected an infinite loop while processing the request. | WebDAV specific. |
| 510 | Not Extended | Further extensions to the request are required for the server to fulfil it. | Obsolete (RFC 2774). |
| 511 | Network Authentication Required | The client needs to authenticate to gain network access. | Captive portals on hotel and airport Wi-Fi. |
HTTP Status Codes Guide · 10 min read
HTTP Status Codes: Complete Reference for Developers
The Five Classes
HTTP status codes are three-digit integers grouped into five ranges by their first digit:
| Range | Class | Meaning |
|---|---|---|
| 1xx | Informational | Request received, processing continues |
| 2xx | Success | Request received, understood, and accepted |
| 3xx | Redirection | Further action needed to complete the request |
| 4xx | Client Error | Request contains bad syntax or cannot be fulfilled |
| 5xx | Server Error | Server failed to fulfil a valid request |
1xx — Informational
Rarely seen in application code but important in HTTP/2 and WebSocket upgrades:
100 Continue — The server has received the request headers and the client should proceed to send the request body. Used when clients send Expect: 100-continue before uploading large payloads.
101 Switching Protocols — The server is switching to the protocol requested in the Upgrade header. This is how WebSocket connections are established — the initial HTTP handshake ends with a 101.
2xx — Success
200 OK — The standard success response. The response body contains the requested resource.
201 Created — A new resource was created. Always include a Location header pointing to the new resource. Use this for POST requests that create records.
HTTP/1.1 201 Created
Location: /api/users/456
Content-Type: application/json
202 Accepted — The request was received and will be processed asynchronously. Use this when work is queued but not yet complete (e.g., email sends, video transcoding jobs, background data exports).
204 No Content — Success, but no body. The correct response for DELETE requests and PUT operations that don't return the updated resource.
206 Partial Content — Used with Range requests for large file downloads. Streaming video players use this to download content in chunks.
3xx — Redirection
301 Moved Permanently — The resource has permanently moved to the URL in the Location header. Search engines transfer all ranking signals to the new URL. Use this for permanent URL changes during site migrations.
302 Found — Temporary redirect. Search engines keep ranking the original URL. Use this for A/B testing redirects, maintenance pages, and login redirects.
303 See Other — After a POST, redirect to a GET endpoint. The standard pattern for POST-Redirect-GET (PRG), which prevents form resubmission on browser back/refresh.
304 Not Modified — The cached version of the resource is still valid. Sent in response to conditional requests (If-None-Match, If-Modified-Since). The browser uses its cache instead of downloading again.
307 Temporary Redirect — Like 302, but the HTTP method must not change. A POST to a URL returning 307 should POST to the redirect target, not GET.
308 Permanent Redirect — Like 301, but the HTTP method must not change. Use this instead of 301 when you need to permanently redirect a POST endpoint.
SEO implication: always use 301 (or 308 for non-GET) for permanent moves. A 302 on a URL that has been "temporarily" redirected for years is a common SEO mistake — Google won't consolidate signals to the new URL.
4xx — Client Errors
400 Bad Request — Generic client error. The server couldn't understand the request due to malformed syntax. Too vague for modern APIs — prefer more specific codes.
401 Unauthorized — Authentication required (despite the name — HTTP spec uses "unauthorized" to mean "unauthenticated"). The client should authenticate and retry. Include a WWW-Authenticate header indicating the authentication scheme.
403 Forbidden — Authenticated but not authorized. The server understood the request but refuses to act on it. Don't expose which resources exist to unauthorized users — return 404 instead of 403 when resource enumeration is a concern.
404 Not Found — Resource doesn't exist. Also the correct response when you want to hide a resource from unauthorized users (as above).
405 Method Not Allowed — The HTTP method isn't allowed on this endpoint. Always include an Allow header listing valid methods. A DELETE /users when only GET and POST are supported.
409 Conflict — Request conflicts with current state. Classic use case: trying to create a user with an email that already exists.
410 Gone — Resource existed but has been permanently deleted. Different from 404 — tells crawlers to remove the URL from their index. Use this for intentionally removed content.
422 Unprocessable Entity — Syntactically valid request but semantically wrong. The right code for validation errors: required field missing, value out of range, wrong data type. Follow RFC 7807 (Problem Details) format:
{
"type": "https://example.com/errors/validation",
"title": "Validation Error",
"status": 422,
"errors": [
{ "field": "email", "message": "Invalid email format" },
{ "field": "age", "message": "Must be 18 or older" }
]
}
429 Too Many Requests — Rate limit exceeded. Always include Retry-After header with the number of seconds to wait. Also include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.
400 vs 401 vs 403 vs 422 — the confusion matrix:
| Code | Situation |
|---|---|
| 400 | Malformed request syntax, unparseable body |
| 401 | No valid authentication credentials provided |
| 403 | Credentials valid, but insufficient permissions |
| 422 | Request parsed, but fails business logic validation |
5xx — Server Errors
500 Internal Server Error — Unhandled exception on the server. Log the full error server-side, return a generic message to the client. Never expose stack traces in production responses.
502 Bad Gateway — The server (acting as a gateway) received an invalid response from an upstream server. Common with reverse proxies (Nginx, load balancers) when your application crashes or returns garbage.
503 Service Unavailable — Server temporarily unable to handle requests — overloaded or down for maintenance. Include a Retry-After header. Used by load balancers when no healthy backend instances are available.
504 Gateway Timeout — The upstream server didn't respond in time. Common in microservice architectures when a dependency is slow. Distinguish from 503: 503 means the server refused; 504 means it didn't respond at all.
504 vs 502: Both are gateway errors. 502 means the upstream responded with garbage; 504 means it didn't respond within the timeout.
Designing Better API Error Responses
A bare status code isn't enough for client developers to act on. Implement RFC 7807 (Problem Details for HTTP APIs) — it's the standard format:
{
"type": "https://api.example.com/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 402,
"detail": "Your balance of $10.00 is below the required $49.99.",
"instance": "/transactions/txn_abc123"
}
The type URI should resolve to documentation explaining the error. The instance URI identifies the specific request that failed. This format is machine-readable and human-understandable simultaneously.
Use our API Error Generator to design and preview RFC 7807 error payloads for your API. Test the actual HTTP responses your server returns with our cURL Generator — pipe the output through our JSON Formatter to inspect response bodies clearly.
Status Codes in Caching
Status codes affect how proxies and browsers cache responses:
| Code | Cacheable by default |
|---|---|
| 200 | Yes (with appropriate headers) |
| 301 | Yes (permanent) |
| 302 | No |
| 404 | Sometimes (brief negative cache) |
| 500 | No |
Setting Cache-Control: no-store overrides this for any code. Understanding which codes are cached by default prevents surprising stale responses in CDN-heavy architectures.
Frequently Asked Questions
Everything you need to know about the HTTP Status Codes and how your data is handled.
- What do the different HTTP status code categories (1xx, 2xx, 3xx, 4xx, 5xx) mean?
- 1xx (Informational) are provisional responses used during connection setup (100 Continue, 101 Switching Protocols). 2xx (Success) indicate the request succeeded (200 OK, 201 Created, 204 No Content). 3xx (Redirection) tell the client to go to a different URL (301 Permanent, 302 Temporary, 304 Not Modified). 4xx (Client Error) mean the client's request is wrong (400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 422 Unprocessable Entity). 5xx (Server Error) mean the server failed to fulfill a valid request (500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable).
- What is the difference between 301 and 302 redirects for SEO?
- A 301 Moved Permanently tells search engines the resource has permanently moved to the new URL. The original URL's PageRank and indexed links transfer to the new URL over time, and Google recrawls at a lower frequency. A 302 Found (temporary redirect) tells crawlers the move is temporary — the original URL should remain indexed and retain its authority. Using 302 when you intend a permanent redirect delays or prevents link equity transfer. For site migrations, URL slug changes, or consolidating duplicate content, always use 301.
- When should an API return 400 versus 422?
- 400 Bad Request means the server cannot understand the request — the syntax is malformed, headers are invalid, or the body is unparseable JSON. 422 Unprocessable Entity (from WebDAV, adopted by REST APIs) means the request was syntactically valid and parseable, but the data failed business logic validation — for example, a missing required field, an invalid email format, or a date in the past when a future date is required. Use 400 for protocol-level failures and 422 for application-level validation errors to give clients more actionable error information.
- What causes a 502 Bad Gateway error?
- A 502 Bad Gateway occurs when a server acting as a proxy or gateway (like Nginx, a load balancer, or a CDN) receives an invalid or empty response from an upstream server. Common causes: the upstream application server crashed or is not running, the upstream timed out before responding, a deployment caused a brief period where no instances were available, or the upstream returned a response the gateway could not parse. Unlike 500 (which comes from your app server), 502 comes from the infrastructure layer in front of it.
Common Use Cases
- API Debugging
- SEO Analysis
- Network Monitoring
Related Tools
Dockerfile Generator
Generate production-ready Dockerfiles visually with step-by-step guidance.
Cron Generator
Build, validate, and explain Cron expressions visually with human-readable translation.
SQL Query Generator
Build complex SQL queries visually with support for multiple dialects.
Base64 Encoder
Encode binary or text data to Base64 format locally.
Base64 Decoder
Decode Base64 strings back to human-readable format locally.
URL Encoder/Decoder
Encode/decode URL components to handle special characters safely.