HTTP Status Codes: Every Code Explained With Examples
One page per registered HTTP response status code. Each explains what the code actually asserts, when it is the right answer, the mistakes that get made with it, and a literal response sample. The request builder on every page lets you fire a request and read the status line you get back.
Every page here embeds the HTTP Request Builder. Build a request with any method, headers and body, send it, and read the status line the server returns.
62 pages in this section.
Class 1xx
100 Continue
The server has read the request headers, is willing to accept the body, and the client should now send it.
101 Switching Protocols
The server agrees to change protocol on this connection, which in practice almost always means upgrading to WebSocket.
102 Processing
A WebDAV interim response meaning the request was received and is still being worked on, sent to stop the client timing out.
103 Early Hints
An interim response that sends Link headers early so the browser can start preloading assets while the server is still building the real response.
Class 2xx
200 OK
The request succeeded. What the body contains depends on the method: a GET returns the resource, a POST returns the result of the action.
201 Created
The request succeeded and created one or more new resources. The Location header carries the URL of the primary one.
202 Accepted
The request was accepted for processing but is not finished, and may still fail. Nothing has necessarily happened yet.
203 Non-Authoritative Information
The request succeeded, but a proxy between you and the origin server altered the response body or headers.
204 No Content
The request succeeded and there is deliberately nothing to send back. The browser stays on the current page.
205 Reset Content
The request succeeded and the client should clear the form that sent it, ready for another entry.
206 Partial Content
The server is returning part of the resource because the request carried a Range header. This is what makes resumable downloads and video seeking work.
207 Multi-Status
A WebDAV response carrying several independent status codes at once, one for each resource the request touched.
208 Already Reported
Inside a WebDAV multi-status response, this member was already listed earlier and its properties are not repeated.
226 IM Used
The server applied a delta encoding and is returning the difference from a version the client already has, rather than the whole resource.
Class 3xx
300 Multiple Choices
The request matched more than one representation and the server is asking the client to pick, rather than choosing for it.
301 Moved Permanently
The resource has a new permanent URL, given in Location. Search engines transfer ranking signals to the target and clients may cache the redirect.
302 Found
The resource is temporarily at a different URL. The original URL stays authoritative and should keep being used for future requests.
303 See Other
The result of the request is at another URL, and the client should fetch it with GET regardless of the original method.
304 Not Modified
The cached copy the client already holds is still current, so the server sent no body. This is what makes conditional requests cheap.
305 Use Proxy
Deprecated. It once told the client to repeat the request through the proxy named in Location, which turned out to be a security problem.
307 Temporary Redirect
Same as 302 but with a guarantee: the client must repeat the request with the original method and body, so a POST stays a POST.
308 Permanent Redirect
A permanent redirect that preserves the request method and body. This is 301 without the historical POST to GET rewrite.
Class 4xx
400 Bad Request
The server refused the request because it was malformed. The client must change something before retrying, because repeating the same bytes will fail.
401 Unauthorized
The request lacks valid credentials. Despite the name, this is about authentication (who you are), not authorisation (what you may do).
402 Payment Required
Reserved for future use in the original specification, and now used in practice by APIs to signal that a plan limit or unpaid invoice is blocking the request.
403 Forbidden
The server understood the request and refuses to fulfil it. Unlike 401, sending different credentials will not help.
404 Not Found
The server has no representation for this URL and will not say whether it ever did. The most common status code on the web after 200.
405 Method Not Allowed
The URL exists but does not support the method you used. The Allow header lists the methods it does support.
406 Not Acceptable
The server cannot produce a representation that matches the Accept headers the client sent.
407 Proxy Authentication Required
A proxy between the client and the server needs credentials. This is 401 raised by the intermediary rather than by the origin.
408 Request Timeout
The server gave up waiting for the client to finish sending the request and closed the idle connection.
409 Conflict
The request clashes with the current state of the resource, for example an edit based on a version that has since changed.
410 Gone
The resource existed and has been permanently removed with no forwarding address. Stronger and more useful than 404 when you know the removal is final.
411 Length Required
The server refuses the request because it did not include a Content-Length header.
412 Precondition Failed
A conditional header on the request, such as If-Match or If-Unmodified-Since, evaluated to false, so the server did not perform the action.
413 Content Too Large
The request body is larger than the server is willing to process. Formerly called Payload Too Large.
414 URI Too Long
The request URL is longer than the server will accept. Almost always caused by putting data in a query string that belongs in a request body.
415 Unsupported Media Type
The server refuses the request because the body is in a format it cannot handle, as declared by Content-Type.
416 Range Not Satisfiable
The Range header asked for bytes that lie outside the resource, for example bytes 5000 to 6000 of a 2KB file.
417 Expectation Failed
The server cannot meet the requirement in the Expect header, which in practice always means Expect: 100-continue.
418 I'm a Teapot
A joke code from the Hyper Text Coffee Pot Control Protocol. It is not part of HTTP and should never be returned by a real service.
421 Misdirected Request
The request reached a server that cannot produce a response for the requested authority, usually a connection reuse problem under HTTP/2.
422 Unprocessable Content
The request was well-formed and understood, but the values inside it failed validation. The syntax was fine and the semantics were not.
423 Locked
The resource is locked by WebDAV and cannot be modified until the lock is released or a valid lock token is supplied.
424 Failed Dependency
The request failed because an earlier request it depended on failed, so this one was never attempted.
425 Too Early
The server refuses to process a request sent in TLS 1.3 early data, because early data can be replayed by an attacker.
426 Upgrade Required
The server refuses to serve this request over the current protocol and names, in the Upgrade header, what it will accept.
428 Precondition Required
The server requires the request to be conditional, and refuses an unconditional one to prevent a lost update.
429 Too Many Requests
The client has sent too many requests in a given period. The Retry-After header says how long to wait before trying again.
431 Request Header Fields Too Large
The request headers are collectively or individually too large. Oversized cookies are the usual cause.
451 Unavailable For Legal Reasons
Access is denied because of a legal demand, such as a court order or a government blocking request.
Class 5xx
500 Internal Server Error
The server hit an unexpected condition and cannot say anything more specific. It is the catch-all for unhandled exceptions.
501 Not Implemented
The server does not support the functionality required to fulfil the request, typically an unrecognised request method.
502 Bad Gateway
A proxy or load balancer got an invalid response from the upstream server it was relaying to. The failure is behind the thing that answered you.
503 Service Unavailable
The server is temporarily unable to handle the request, because it is overloaded or deliberately down for maintenance. The condition is expected to clear.
504 Gateway Timeout
A proxy gave up waiting for the upstream server to answer. The upstream may still be working on the request.
505 HTTP Version Not Supported
The server refuses the major HTTP version used in the request line.
506 Variant Also Negotiates
A server configuration error in transparent content negotiation: a chosen variant is itself configured to negotiate, creating a loop.
507 Insufficient Storage
The server cannot store the representation needed to complete the request, because it is out of space.
508 Loop Detected
The server aborted the operation because it detected an infinite loop while processing a request with WebDAV bindings.
510 Not Extended
The server requires further extensions to the request before it will fulfil it. From an experimental extension framework that was never widely adopted.
511 Network Authentication Required
The client must authenticate to gain network access. This is the captive portal code, sent by the network rather than by the site you asked for.