HTTP Status Codes

Quick reference for all HTTP response status codes. Search by code number or keyword, see causes and how to fix common errors.

37 status codes
100
Continue
1xx▼
101
Switching Protocols
1xx▼
103
Early Hints
1xx▼
200
OK
2xx▼
201
Created
2xx▼
202
Accepted
2xx▼
204
No Content
2xx▼
206
Partial Content
2xx▼
301
Moved Permanently
3xx▼
302
Found
3xx▼
303
See Other
3xx▼
304
Not Modified
3xx▼
307
Temporary Redirect
3xx▼
308
Permanent Redirect
3xx▼
400
Bad Request
4xx▼
401
Unauthorized
4xx▼
403
Forbidden
4xx▼
404
Not Found
4xx▼
405
Method Not Allowed
4xx▼
406
Not Acceptable
4xx▼
408
Request Timeout
4xx▼
409
Conflict
4xx▼
410
Gone
4xx▼
413
Payload Too Large
4xx▼
415
Unsupported Media Type
4xx▼
422
Unprocessable Entity
4xx▼
429
Too Many Requests
4xx▼
431
Request Header Fields Too Large
4xx▼
451
Unavailable For Legal Reasons
4xx▼
500
Internal Server Error
5xx▼
501
Not Implemented
5xx▼
502
Bad Gateway
5xx▼
503
Service Unavailable
5xx▼
504
Gateway Timeout
5xx▼
507
Insufficient Storage
5xx▼
508
Loop Detected
5xx▼
511
Network Authentication Required
5xx▼

HTTP Status Code Reference — Complete Guide

HTTP status codes are three-digit numbers returned by a web server in response to every request. They tell the client whether the request succeeded, was redirected, or failed — and why. This reference covers all standard codes with practical explanations, real-world causes, and actionable fixes.

HTTP Status Code Categories

1xx Informational — server received the request, continuing to process. Rarely seen except 101 (WebSocket upgrade). 2xx Success — request was accepted. 200 OK is the most common. 201 Created is returned after successful POST. 204 No Content for successful DELETE with no response body.

3xx Redirection — client needs additional action. 301 Moved Permanently passes SEO authority. 302 Found is temporary redirect. 304 Not Modified tells the browser to use cache. 4xx Client Errors — request has a problem. 400 Bad Request = malformed syntax. 401 Unauthorized = missing auth. 403 Forbidden = authenticated but not authorized. 404 Not Found is the most well-known error.

5xx Server Errors — server failed to fulfill a valid request. 500 Internal Server Error is a catch-all. 502 Bad Gateway = upstream returned invalid response (common with nginx). 503 Service Unavailable = overloaded or maintenance. 504 Gateway Timeout = upstream didn't respond in time.

Most Common HTTP Errors and How to Fix Them

404 Not Found — check URL for typos, verify resource exists, check rewrite rules, confirm the route is defined. 500 Internal Server Error — check application logs (not web server logs), look for unhandled exceptions, database failures, or missing env variables. 502 Bad Gateway — verify upstream app is running, check port matches proxy config, review memory limits (common: app OOM-killed).

429 Too Many Requests — you're hitting a rate limit. Implement exponential backoff and respect Retry-After headers. 401 vs 403 — 401 means "who are you?" (authentication needed), 403 means "I know who you are, but access denied" (authorization).

HTTP Status Codes for REST APIs

Best practices: return 201 for resource creation with a Location header, 204 for successful deletions, 400 for validation errors with details in the body, 409 Conflict for duplicates, and 422 Unprocessable Entity for semantically wrong requests. Include machine-readable error codes alongside HTTP status for easier client handling.