HTTP 5xx Server Error Codes List

Get a complete, ordered reference of HTTP 5xx status codes for server-side failure conditions.

HTTP 5xx server error codes(11 registered status codes)

Based on the IANA HTTP Status Code Registry for the 5xx range. Includes any registered special entries and excludes unassigned ranges.

How to use this list

Apply HTTP 5xx codes in 3 steps

Takes ~5 seconds
  1. 1
    Choose output format

    Select text for docs, JSON for constants, or HTML for form controls.

  2. 2
    Copy or download

    Use one-click copy or download the output file.

  3. 3
    Use in your workflow

    Paste into runbooks, tests, SDK docs, or monitoring rules.

Need dropdown options for 5xx handling? Use HTML <select> output.

Common use cases

  • Developers documenting expected API response classes
  • QA teams creating focused response-code test coverage
  • Platform teams standardizing logs and alert labels

Examples

5xx example code.

Input
500
Output
500 Internal Server Error

Additional code in the same class.

Input
503
Output
503 Service Unavailable

HTML output for select menus.

Input
500 Internal Server Error
Output
<option value="500 Internal Server Error">500 Internal Server Error</option>

Reliable HTTP 5xx response reference

This list provides a focused reference of HTTP 5xx entries so teams can standardize behavior across implementation, testing, and operations.

HTTP 5xx codes all mean the server, not the client, is at fault, but the specific code points to a different failure mode: 500 for an unhandled server-side error, 502 when a gateway gets an invalid response from upstream, 503 when the server is deliberately unavailable (overload or maintenance), and 504 when an upstream request simply timed out. This list gives you the full IANA-registered 5xx range in copy-ready text, JSON, or HTML <option> format, so incident runbooks, alerting rules, and gateway error handling can distinguish these failure modes instead of logging everything as a generic 500.

502 vs. 503 vs. 504

Every 5xx code means the failure is on the server side, but gateway, overload, and timeout failures each point to a different fix.

  • 502 for a bad response from upstream
  • 503 for a server that's overloaded or down for maintenance
  • 504 for an upstream that took too long
One click, three formats

Grab the range as plain text, a JSON array, or ready-to-paste HTML <option> tags.

  • Plain text list
  • JSON array
  • HTML <option> tags
Scoped to server failures only

No client-error or success codes mixed in — just the range that points back at your own infrastructure.

  • Incident and on-call runbooks
  • Alerting and dashboard rules
  • Gateway and proxy error mapping

Choosing the right 5xx code

Precise 5xx codes make incidents faster to triage, because the code itself tells you where to look.

  • Return 503 (not 500) for planned maintenance or overload so clients and monitors know the outage is temporary.
  • Distinguish 502 (an invalid response from upstream) from 504 (upstream took too long) in gateway and load-balancer logs.
  • Alert on 5xx rates separately from 4xx rates — a 5xx spike means your own systems need attention, not the caller.

Frequently asked questions

What's the difference between 502 and 504?>
502 means a gateway or proxy received an invalid or malformed response from an upstream server. 504 means the upstream server never responded in time at all.
Should a planned maintenance window return a 500?>
No. Use 503 with a Retry-After header so clients and monitoring tools know the outage is expected and temporary, rather than treating it as an unhandled failure.
Can a 5xx error ever be the client's fault?>
No. By definition, 5xx codes indicate the server failed to fulfill a valid request. If the request itself was invalid, that's a 4xx, not a 5xx.

Related Developer lists

Application MIME Types List | Copy-Ready Text, JSON & HTML

Copy common application/* MIME types in text, JSON, or HTML format for API content negotiation, downloads, and file validation.

Audio MIME Types List | Copy-Ready Text, JSON & HTML

Copy common audio MIME types in text, JSON, or HTML format for uploads, playback support checks, and processing pipelines.

Common MIME Types List | Copy-Ready Text, JSON & HTML

Copy a practical common MIME types list in text, JSON, or HTML format for uploads, APIs, validation, and content handling.

HTTP 2xx Success Codes List | Copy-Ready Text, JSON & HTML

Copy all HTTP 2xx success codes in text, JSON, or HTML format for API docs, tests, and monitoring workflows, ready to paste.

HTTP 3xx Redirect Codes List | Copy-Ready Text, JSON & HTML

Copy all HTTP 3xx redirect codes in text, JSON, or HTML format for API docs, tests, and monitoring workflows, ready to paste.

HTTP 4xx Error Codes List | Copy-Ready Text, JSON & HTML

Copy all HTTP 4xx client error codes in text, JSON, or HTML format for API docs, tests, and monitoring workflows.

HTTP Request Methods List | Copy-Ready Text, JSON & HTML

Copy a clean http request methods list (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS, TRACE, CONNECT) in text, JSON, or HTML for API docs and tooling.

HTTP Status Codes List | Copy-Ready Text, JSON & HTML

Copy the complete IANA-registered HTTP status codes list in text, JSON, or HTML format for APIs, docs, testing, and observability workflows.

Image MIME Types List | Copy-Ready Text, JSON & HTML

Copy common image MIME types in text, JSON, or HTML format for upload validation, image processing, and media tooling.

Video MIME Types List | Copy-Ready Text, JSON & HTML

Copy common video MIME types in text, JSON, or HTML format for upload policies, streaming workflows, and player support checks.