🔌 HTTP Status Codes

Complete reference for web developers — all standard HTTP response codes

100 Continue
1xx Informational

Description

The server has received the request headers and the client should proceed to send the request body.

Common Use Cases

Used in large file uploads where the client sends an Expect: 100-continue header before sending the body.

Example

POST /upload HTTP/1.1
Host: example.com
Expect: 100-continue

HTTP/1.1 100 Continue
101 Switching Protocols
1xx Informational

Description

The server is switching protocols as requested by the client via the Upgrade header.

Common Use Cases

Used when upgrading from HTTP to WebSocket connections.

Example

GET /chat HTTP/1.1
Host: example.com
Upgrade: websocket
Connection: Upgrade

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
102 Processing
1xx Informational

Description

The server has received and is processing the request, but no response is available yet.

Common Use Cases

Used in WebDAV when a request may take a long time to process, preventing the client from timing out.

Example

PROPFIND /files HTTP/1.1
Host: example.com
Depth: infinity

HTTP/1.1 102 Processing
103 Early Hints
1xx Informational

Description

Used to return some response headers before the final HTTP message, allowing the browser to preload resources.

Common Use Cases

Allows the server to send Link headers early so the browser can start preloading stylesheets, scripts, or fonts.

Example

GET / HTTP/1.1
Host: example.com

HTTP/1.1 103 Early Hints
Link: </style.css>; rel=preload; as=style

HTTP/1.1 200 OK
200 OK
2xx Success

Description

The request has succeeded. The meaning depends on the HTTP method used.

Common Use Cases

Standard response for successful HTTP requests. GET returns the resource, POST returns the result of the action.

Example

GET /api/users/1 HTTP/1.1
Host: api.example.com

HTTP/1.1 200 OK
Content-Type: application/json

{"id": 1, "name": "John"}
201 Created
2xx Success

Description

The request has been fulfilled and a new resource has been created.

Common Use Cases

Returned after a successful POST request that creates a new resource. Should include a Location header.

Example

POST /api/users HTTP/1.1
Content-Type: application/json

{"name": "Jane"}

HTTP/1.1 201 Created
Location: /api/users/2
202 Accepted
2xx Success

Description

The request has been accepted for processing, but the processing has not been completed.

Common Use Cases

Used for asynchronous operations where the server queues the request for later processing.

Example

POST /api/reports/generate HTTP/1.1

HTTP/1.1 202 Accepted
{"status": "queued", "jobId": "abc123"}
203 Non-Authoritative Information
2xx Success

Description

The returned metadata is not exactly the same as available from the origin server.

Common Use Cases

Used by transforming proxies that modify the response headers or body from the origin server.

Example

GET /page HTTP/1.1

HTTP/1.1 203 Non-Authoritative Information
Content-Type: text/html
(modified by proxy)
204 No Content
2xx Success

Description

The server has successfully fulfilled the request and there is no additional content to send.

Common Use Cases

Common response for DELETE requests or PUT/PATCH updates where no body needs to be returned.

Example

DELETE /api/users/1 HTTP/1.1

HTTP/1.1 204 No Content
205 Reset Content
2xx Success

Description

The server has fulfilled the request and the client should reset the document view.

Common Use Cases

Used to tell the browser to clear the form that caused the request to be sent.

Example

POST /api/form HTTP/1.1

HTTP/1.1 205 Reset Content
206 Partial Content
2xx Success

Description

The server is delivering only part of the resource due to a Range header sent by the client.

Common Use Cases

Used for resumable downloads and video streaming where only a portion of the file is requested.

Example

GET /video.mp4 HTTP/1.1
Range: bytes=0-1023

HTTP/1.1 206 Partial Content
Content-Range: bytes 0-1023/146515
207 Multi-Status
2xx Success

Description

Conveys information about multiple resources where multiple status codes might be appropriate.

Common Use Cases

Used in WebDAV to return status for multiple sub-requests in a single response body.

Example

PROPFIND /files HTTP/1.1

HTTP/1.1 207 Multi-Status
Content-Type: application/xml
(multiple status elements)
208 Already Reported
2xx Success

Description

Used inside a DAV: propstat response to avoid enumerating internal members of multiple bindings.

Common Use Cases

Prevents duplicate enumeration of the same resource in WebDAV binding operations.

Example

PROPFIND /collection HTTP/1.1

HTTP/1.1 207 Multi-Status
(208 Already Reported for repeated bindings)
226 IM Used
2xx Success

Description

The server has fulfilled a GET request and the response is a representation of one or more instance-manipulations.

Common Use Cases

Used with delta encoding to send only the changes to a resource rather than the full representation.

Example

GET /resource HTTP/1.1
A-IM: feed

HTTP/1.1 226 IM Used
IM: feed
300 Multiple Choices
3xx Redirection

Description

The request has more than one possible response. The user or user agent should choose one of them.

Common Use Cases

Rarely used. Indicates multiple representations of a resource, such as different formats or languages.

Example

GET /document HTTP/1.1

HTTP/1.1 300 Multiple Choices
Link: </document.pdf>; type="application/pdf"
Link: </document.html>; type="text/html"
301 Moved Permanently
3xx Redirection

Description

The URL of the requested resource has been changed permanently. The new URL is given in the response.

Common Use Cases

Used for permanent URL redirects. Search engines will update their index to the new URL.

Example

GET /old-page HTTP/1.1

HTTP/1.1 301 Moved Permanently
Location: /new-page
302 Found
3xx Redirection

Description

The URI of the requested resource has been changed temporarily. The client should continue to use the original URI.

Common Use Cases

Used for temporary redirects. Common after form submissions to redirect to a success page.

Example

POST /login HTTP/1.1

HTTP/1.1 302 Found
Location: /dashboard
303 See Other
3xx Redirection

Description

The server sent this response to direct the client to get the requested resource at another URI with a GET request.

Common Use Cases

Used after a POST or PUT to redirect the client to a different resource using GET.

Example

POST /api/orders HTTP/1.1

HTTP/1.1 303 See Other
Location: /api/orders/123
304 Not Modified
3xx Redirection

Description

The resource has not been modified since the version specified by the request headers.

Common Use Cases

Used for caching. The client can use its cached version when the server confirms nothing has changed.

Example

GET /style.css HTTP/1.1
If-None-Match: "abc123"

HTTP/1.1 304 Not Modified
305 Use Proxy
3xx Redirection

Description

The requested resource must be accessed through the proxy given by the Location header. Deprecated.

Common Use Cases

Deprecated due to security concerns. Was used to indicate that a proxy must be used.

Example

GET /resource HTTP/1.1

HTTP/1.1 305 Use Proxy
Location: http://proxy.example.com
307 Temporary Redirect
3xx Redirection

Description

The server sends this response to direct the client to get the requested resource at another URI with the same method.

Common Use Cases

Like 302 but guarantees the HTTP method will not change. POST stays POST after redirect.

Example

POST /api/v1/data HTTP/1.1

HTTP/1.1 307 Temporary Redirect
Location: /api/v2/data
308 Permanent Redirect
3xx Redirection

Description

The resource is now permanently located at another URI. The method and body will not change in the redirect.

Common Use Cases

Like 301 but guarantees the HTTP method will not change. Useful for API versioning.

Example

POST /api/v1/submit HTTP/1.1

HTTP/1.1 308 Permanent Redirect
Location: /api/v2/submit
400 Bad Request
4xx Client Error

Description

The server cannot process the request due to something perceived to be a client error.

Common Use Cases

Used when the request has malformed syntax, invalid parameters, or missing required fields.

Example

POST /api/users HTTP/1.1
Content-Type: application/json

{invalid json}

HTTP/1.1 400 Bad Request
{"error": "Invalid JSON in request body"}
401 Unauthorized
4xx Client Error

Description

The client must authenticate itself to get the requested response.

Common Use Cases

Returned when authentication is required but not provided or invalid credentials were sent.

Example

GET /api/profile HTTP/1.1

HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer
{"error": "Authentication required"}
402 Payment Required
4xx Client Error

Description

Reserved for future use. Originally intended for digital payment systems.

Common Use Cases

Sometimes used by APIs to indicate that a paid subscription or credits are required.

Example

GET /api/premium/data HTTP/1.1

HTTP/1.1 402 Payment Required
{"error": "Subscription required"}
403 Forbidden
4xx Client Error

Description

The client does not have access rights to the content. Unlike 401, the client's identity is known.

Common Use Cases

Used when the authenticated user does not have permission to access the requested resource.

Example

DELETE /api/admin/users HTTP/1.1
Authorization: Bearer user-token

HTTP/1.1 403 Forbidden
{"error": "Admin access required"}
404 Not Found
4xx Client Error

Description

The server cannot find the requested resource. The URL is not recognized.

Common Use Cases

The most common error response. Returned when the requested URL or resource does not exist.

Example

GET /api/users/99999 HTTP/1.1

HTTP/1.1 404 Not Found
{"error": "User not found"}
405 Method Not Allowed
4xx Client Error

Description

The request method is known by the server but is not supported by the target resource.

Common Use Cases

Returned when using an unsupported HTTP method on an endpoint, e.g., DELETE on a read-only resource.

Example

DELETE /api/logs HTTP/1.1

HTTP/1.1 405 Method Not Allowed
Allow: GET, HEAD
406 Not Acceptable
4xx Client Error

Description

The server cannot produce a response matching the list of acceptable values in the request headers.

Common Use Cases

Returned when the server cannot serve content matching the Accept headers sent by the client.

Example

GET /api/data HTTP/1.1
Accept: application/xml

HTTP/1.1 406 Not Acceptable
{"error": "Only application/json is supported"}
407 Proxy Authentication Required
4xx Client Error

Description

Similar to 401 but authentication is needed to be done by a proxy.

Common Use Cases

Returned by a proxy server when the client has not provided valid proxy authentication credentials.

Example

GET http://example.com/ HTTP/1.1

HTTP/1.1 407 Proxy Authentication Required
Proxy-Authenticate: Basic realm="proxy"
408 Request Timeout
4xx Client Error

Description

The server would like to shut down this unused connection.

Common Use Cases

Sent when the server did not receive a complete request within the time it was prepared to wait.

Example

GET /api/data HTTP/1.1
(client too slow sending request)

HTTP/1.1 408 Request Timeout
409 Conflict
4xx Client Error

Description

The request conflicts with the current state of the server.

Common Use Cases

Used when a request would cause a conflict, such as duplicate entries or version mismatches.

Example

PUT /api/users/1 HTTP/1.1
If-Match: "old-etag"

HTTP/1.1 409 Conflict
{"error": "Resource has been modified"}
410 Gone
4xx Client Error

Description

The content has been permanently deleted from the server with no forwarding address.

Common Use Cases

Like 404 but indicates the resource existed before and was intentionally removed permanently.

Example

GET /api/v1/deprecated-endpoint HTTP/1.1

HTTP/1.1 410 Gone
{"error": "This endpoint has been permanently removed"}
411 Length Required
4xx Client Error

Description

The server rejected the request because the Content-Length header field is not defined.

Common Use Cases

Returned when the server requires a Content-Length header that the client did not send.

Example

POST /api/upload HTTP/1.1
(no Content-Length header)

HTTP/1.1 411 Length Required
412 Precondition Failed
4xx Client Error

Description

The client has indicated preconditions in its headers which the server does not meet.

Common Use Cases

Used with conditional requests (If-Match, If-Unmodified-Since) when conditions are not satisfied.

Example

PUT /api/doc HTTP/1.1
If-Unmodified-Since: Sat, 01 Jan 2024

HTTP/1.1 412 Precondition Failed
413 Content Too Large
4xx Client Error

Description

The request entity is larger than limits defined by the server.

Common Use Cases

Returned when the request body exceeds the server's maximum allowed size.

Example

POST /api/upload HTTP/1.1
Content-Length: 1073741824

HTTP/1.1 413 Content Too Large
{"error": "Max upload size is 10MB"}
414 URI Too Long
4xx Client Error

Description

The URI requested by the client is longer than the server is willing to interpret.

Common Use Cases

Returned when the URL exceeds the server's length limit, often from excessive query parameters.

Example

GET /search?q=very...long...query HTTP/1.1

HTTP/1.1 414 URI Too Long
415 Unsupported Media Type
4xx Client Error

Description

The media format of the requested data is not supported by the server.

Common Use Cases

Returned when the Content-Type of the request body is not supported by the endpoint.

Example

POST /api/data HTTP/1.1
Content-Type: text/plain

HTTP/1.1 415 Unsupported Media Type
{"error": "Expected application/json"}
416 Range Not Satisfiable
4xx Client Error

Description

The range specified by the Range header in the request cannot be fulfilled.

Common Use Cases

Returned when the client requests a byte range that is outside the size of the resource.

Example

GET /file.pdf HTTP/1.1
Range: bytes=9999999-

HTTP/1.1 416 Range Not Satisfiable
Content-Range: bytes */5000
417 Expectation Failed
4xx Client Error

Description

The expectation given in the Expect request header could not be met by the server.

Common Use Cases

Returned when the server cannot meet the requirements of the Expect header field.

Example

POST /upload HTTP/1.1
Expect: 100-continue

HTTP/1.1 417 Expectation Failed
418 I'm a Teapot
4xx Client Error

Description

The server refuses the attempt to brew coffee with a teapot. An April Fools' joke from RFC 2324.

Common Use Cases

A humorous status code from the Hyper Text Coffee Pot Control Protocol. Not expected in production.

Example

BREW /coffee HTTP/1.1

HTTP/1.1 418 I'm a Teapot
{"error": "I can only brew tea"}
421 Misdirected Request
4xx Client Error

Description

The request was directed at a server that is not able to produce a response.

Common Use Cases

Used when the server is not configured to produce responses for the combination of scheme and authority in the request URI.

Example

GET /resource HTTP/2
Host: wrong-host.example.com

HTTP/2 421 Misdirected Request
422 Unprocessable Content
4xx Client Error

Description

The request was well-formed but was unable to be followed due to semantic errors.

Common Use Cases

Common in APIs when the request body is valid JSON/XML but contains invalid field values or logic.

Example

POST /api/users HTTP/1.1
{"email": "not-an-email"}

HTTP/1.1 422 Unprocessable Content
{"errors": {"email": "Invalid format"}}
423 Locked
4xx Client Error

Description

The resource that is being accessed is locked.

Common Use Cases

Used in WebDAV when a resource is locked by another user or process.

Example

PUT /files/doc.txt HTTP/1.1

HTTP/1.1 423 Locked
{"error": "Resource is locked by another user"}
424 Failed Dependency
4xx Client Error

Description

The request failed because it depended on another request that failed.

Common Use Cases

Used in WebDAV when an action on a resource fails because a previous required action failed.

Example

COPY /files/ HTTP/1.1

HTTP/1.1 424 Failed Dependency
{"error": "Copy failed: source file locked"}
425 Too Early
4xx Client Error

Description

The server is unwilling to risk processing a request that might be replayed.

Common Use Cases

Used with TLS Early Data (0-RTT) to prevent replay attacks on non-idempotent requests.

Example

POST /api/payment HTTP/1.1
(via TLS 0-RTT)

HTTP/1.1 425 Too Early
426 Upgrade Required
4xx Client Error

Description

The server refuses to perform the request using the current protocol.

Common Use Cases

The server requires the client to upgrade to a different protocol, such as TLS or HTTP/2.

Example

GET /secure HTTP/1.1

HTTP/1.1 426 Upgrade Required
Upgrade: TLS/1.3
Connection: Upgrade
428 Precondition Required
4xx Client Error

Description

The origin server requires the request to be conditional.

Common Use Cases

Used to prevent lost updates. The server requires If-Match or If-Unmodified-Since headers.

Example

PUT /api/doc HTTP/1.1
(no conditional headers)

HTTP/1.1 428 Precondition Required
{"error": "If-Match header required"}
429 Too Many Requests
4xx Client Error

Description

The user has sent too many requests in a given amount of time (rate limiting).

Common Use Cases

Used for rate limiting. Should include a Retry-After header indicating when to retry.

Example

GET /api/data HTTP/1.1

HTTP/1.1 429 Too Many Requests
Retry-After: 60
{"error": "Rate limit exceeded"}
431 Request Header Fields Too Large
4xx Client Error

Description

The server is unwilling to process the request because its header fields are too large.

Common Use Cases

Returned when request headers (often cookies) exceed the server's size limits.

Example

GET / HTTP/1.1
Cookie: (very large cookie)

HTTP/1.1 431 Request Header Fields Too Large
451 Unavailable For Legal Reasons
4xx Client Error

Description

The user agent requested a resource that cannot legally be provided.

Common Use Cases

Used when access is denied due to legal demands such as government censorship or court orders.

Example

GET /blocked-content HTTP/1.1

HTTP/1.1 451 Unavailable For Legal Reasons
Link: <https://example.com/legal>; rel="blocked-by"
500 Internal Server Error
5xx Server Error

Description

The server has encountered a situation it does not know how to handle.

Common Use Cases

Generic server error when an unexpected condition prevents the request from being fulfilled.

Example

GET /api/data HTTP/1.1

HTTP/1.1 500 Internal Server Error
{"error": "An unexpected error occurred"}
501 Not Implemented
5xx Server Error

Description

The request method is not supported by the server and cannot be handled.

Common Use Cases

Returned when the server does not recognize the request method or lacks the ability to fulfill it.

Example

PATCH /api/resource HTTP/1.1

HTTP/1.1 501 Not Implemented
{"error": "PATCH method not supported"}
502 Bad Gateway
5xx Server Error

Description

The server, while acting as a gateway, got an invalid response from the upstream server.

Common Use Cases

Common with reverse proxies and load balancers when the backend server returns an invalid response.

Example

GET /api/data HTTP/1.1

HTTP/1.1 502 Bad Gateway
{"error": "Upstream server returned invalid response"}
503 Service Unavailable
5xx Server Error

Description

The server is not ready to handle the request, often due to maintenance or overload.

Common Use Cases

Used during server maintenance or when the server is overloaded. Should include Retry-After header.

Example

GET /api/data HTTP/1.1

HTTP/1.1 503 Service Unavailable
Retry-After: 300
{"error": "Server under maintenance"}
504 Gateway Timeout
5xx Server Error

Description

The server is acting as a gateway and cannot get a response from the upstream server in time.

Common Use Cases

Common with reverse proxies when the backend server takes too long to respond.

Example

GET /api/slow-query HTTP/1.1

HTTP/1.1 504 Gateway Timeout
{"error": "Upstream server timed out"}
505 HTTP Version Not Supported
5xx Server Error

Description

The HTTP version used in the request is not supported by the server.

Common Use Cases

Returned when the client uses an HTTP version the server does not support.

Example

GET / HTTP/3.0

HTTP/1.1 505 HTTP Version Not Supported
506 Variant Also Negotiates
5xx Server Error

Description

The server has an internal configuration error: transparent content negotiation results in a circular reference.

Common Use Cases

Indicates a misconfiguration in server-driven content negotiation.

Example

GET /resource HTTP/1.1
Accept: text/html

HTTP/1.1 506 Variant Also Negotiates
507 Insufficient Storage
5xx Server Error

Description

The server is unable to store the representation needed to complete the request.

Common Use Cases

Used in WebDAV when the server cannot store the resource due to insufficient storage space.

Example

PUT /files/large-file.zip HTTP/1.1

HTTP/1.1 507 Insufficient Storage
{"error": "Not enough disk space"}
508 Loop Detected
5xx Server Error

Description

The server detected an infinite loop while processing the request.

Common Use Cases

Used in WebDAV when a PROPFIND with Depth: infinity encounters a loop in resource bindings.

Example

PROPFIND /collection HTTP/1.1
Depth: infinity

HTTP/1.1 508 Loop Detected
510 Not Extended
5xx Server Error

Description

Further extensions to the request are required for the server to fulfill it.

Common Use Cases

The server requires additional extensions in the request that were not provided by the client.

Example

GET /resource HTTP/1.1

HTTP/1.1 510 Not Extended
{"error": "Missing required extension"}
511 Network Authentication Required
5xx Server Error

Description

The client needs to authenticate to gain network access, typically from a captive portal.

Common Use Cases

Used by captive portals (e.g., hotel/airport WiFi) to redirect users to a login page.

Example

GET / HTTP/1.1

HTTP/1.1 511 Network Authentication Required
Location: /login-portal

⚡ Pro Features

📡

API Monitoring

Monitor your API endpoints in real-time. Get instant alerts when status codes change.

📊

Status Code Analytics

Track status code distribution across your services with visual dashboards.

🔔

Webhook Notifications

Set up webhook alerts for specific status codes. Integrate with Slack, Discord & more.

🔒 Pro Features

Unlock Pro Features

$9
Upgrade to Pro — $9