DevOps & Development Experts
From CI/CD pipelines to custom applications, our team builds secure solutions that scale.
What Are HTTP Status Codes
HTTP status codes are three-digit numbers returned by web servers in response to client requests. They indicate whether a request was successful, redirected, resulted in a client error, or caused a server error. Understanding status codes is essential for web development, API design, debugging, and monitoring.
Status codes are defined by RFC 9110 (HTTP Semantics) and organized into five classes based on their first digit. This tool provides a comprehensive reference for all standard and common non-standard status codes with explanations, use cases, and debugging guidance.
Status Code Classes
| Class | Range | Meaning | Examples |
|---|---|---|---|
| 1xx | 100-199 | Informational — request received, processing continues | 100 Continue, 101 Switching Protocols |
| 2xx | 200-299 | Success — request received, understood, and accepted | 200 OK, 201 Created, 204 No Content |
| 3xx | 300-399 | Redirection — further action needed to complete request | 301 Moved Permanently, 302 Found, 304 Not Modified |
| 4xx | 400-499 | Client Error — request contains errors or cannot be fulfilled | 400 Bad Request, 401 Unauthorized, 404 Not Found |
| 5xx | 500-599 | Server Error — server failed to fulfill a valid request | 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable |
Most Common Status Codes
| Code | Name | When Returned |
|---|---|---|
| 200 | OK | Request succeeded — response contains the requested resource |
| 201 | Created | Resource was successfully created (POST/PUT) |
| 204 | No Content | Success, but no response body (DELETE, updates) |
| 301 | Moved Permanently | Resource has a new permanent URL — update bookmarks |
| 304 | Not Modified | Cached version is still valid — no data transfer needed |
| 400 | Bad Request | Request syntax or parameters are invalid |
| 401 | Unauthorized | Authentication required or failed |
| 403 | Forbidden | Authenticated but not authorized for this resource |
| 404 | Not Found | Resource does not exist at this URL |
| 429 | Too Many Requests | Rate limit exceeded — slow down |
| 500 | Internal Server Error | Generic server failure — check server logs |
| 502 | Bad Gateway | Upstream server returned an invalid response |
| 503 | Service Unavailable | Server is overloaded or in maintenance |
Common Use Cases
- API development: Choose the correct status code for each API response to follow HTTP semantics and help clients handle responses appropriately
- Debugging: Quickly look up unfamiliar status codes encountered during development and troubleshooting
- Monitoring and alerting: Configure monitoring to alert on specific status codes (spike in 5xx errors, unexpected 401s, 429 rate limiting)
- SEO optimization: Ensure redirects use correct codes (301 for permanent, 302 for temporary) to preserve search engine rankings
- Load balancer configuration: Configure health checks and error handling based on backend status codes
Best Practices
- Use specific codes, not just 200 and 500 — Return 201 for created resources, 204 for successful deletions, 404 for missing resources, and 409 for conflicts. Specific codes help clients handle responses correctly.
- Return 401 vs 403 correctly — 401 means "you need to authenticate." 403 means "you authenticated but lack permission." Conflating them leaks information about resource existence.
- Use 429 with Retry-After — When rate limiting, return 429 Too Many Requests with a Retry-After header telling the client when to try again.
- Never return 200 with an error body — Some APIs return 200 OK with {"error": "not found"} in the body. This breaks HTTP semantics and confuses monitoring, caching, and client error handling.
- Log all 5xx errors — Every 500-level response represents a server failure that needs investigation. Ensure comprehensive logging for all 5xx responses.
References & Citations
- IETF. (2022). RFC 9110: HTTP Semantics (Status Codes). Retrieved from https://www.rfc-editor.org/rfc/rfc9110.html#name-status-codes (accessed January 2025)
- MDN Web Docs. (2024). HTTP Status Code Definitions. Retrieved from https://developer.mozilla.org/en-US/docs/Web/HTTP/Status (accessed January 2025)
Note: These citations are provided for informational and educational purposes. Always verify information with the original sources and consult with qualified professionals for specific advice related to your situation.
Key Security Terms
Understand the essential concepts behind this tool
Frequently Asked Questions
Common questions about the HTTP Status Code Lookup
HTTP status codes are 3-digit responses from servers indicating request results. Categories: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client error), 5xx (server error). Purpose: communicate success/failure, enable proper error handling, assist debugging, affect SEO rankings. Common codes: 200 OK (success), 404 Not Found (missing resource), 500 Internal Server Error (server problem). Clients use codes to: retry on 503, cache 200 responses, follow 301 redirects, display error messages. Essential for web APIs, browser behavior, and application logic.