HTTP Status Codes

HTTP status codes are three-digit codes returned in a response's status line, grouped into five classes (1xx–5xx) that indicate how a request was handled.

Updated: 2026-08-11

Lookup

HTTP Status Codes
Definition
1xx InformationalRequest received, continuing process. E.g. 100 Continue, 101 Switching Protocols.
2xx SuccessRequest successfully received, understood, and accepted. E.g. 200 OK, 201 Created, 204 No Content.
3xx RedirectionFurther action needed to complete the request. E.g. 301 Moved Permanently, 302 Found, 304 Not Modified.
4xx Client ErrorThe request has bad syntax or cannot be fulfilled. E.g. 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 429 Too Many Requests.
5xx Server ErrorThe server failed to fulfill a valid request. E.g. 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout.

Examples

A status line

text
HTTP/1.1 404 Not Found

Common Mistakes

!
Returning 200 with an error payload
Sending {"error": "not found"} with a 200 status defeats HTTP-level error handling (retries, caching, monitoring) — use the matching 4xx/5xx status instead.
!
Confusing 401 and 403
401 means missing/invalid credentials; 403 means valid credentials with insufficient permission. See the 401 vs 403 guide.
!
Using 302 for API redirects
302 lets some clients silently change the request method on redirect; use 307 (or 308 for permanent) to guarantee the method and body are preserved.

Related Concepts

HTTP

Related Tools

Related Guides