What are the main categories of HTTP status codes (2xx, 3xx, 4xx, 5xx), and what does each class signify?

Last updated 29 June 2026

HTTP status codes are grouped by their first digit into five classes, each signaling the broad outcome of a request so clients can react without parsing the body.

  • 1xx Informational: Provisional, interim responses (e.g. 100 Continue); rarely surfaced in app code.

  • 2xx Success: Request received and processed: 200 OK, 201 Created, 204 No Content.

  • 3xx Redirection: Further action needed, usually following a new location: 301 Moved Permanently, 304 Not Modified.

  • 4xx Client Error: The client's request is at fault: 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found. Don't retry unchanged.

  • 5xx Server Error: The server failed to fulfill a valid request: 500 Internal Server Error, 503 Service Unavailable. Often safe to retry.

  • https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
  • https://www.baeldung.com/cs/http-status-codes
  • https://dev.to/gianfcop98/the-ultimate-guide-to-http-status-codes-in-rest-apis-40cp
  • https://umbraco.com/knowledge-base/http-status-codes/
  • https://restfulapi.net/http-status-codes/
  • https://medium.com/@bvsahane89/mastering-rest-apis-http-status-codes-in-rest-e7cb2a97fde8
  • https://www.freecodecamp.org/news/what-is-a-rest-api/
  • https://www.baeldung.com/rest-api-error-handling-best-practices
All REST API interview questions