All tools

HTTP status code lookup

Look up what every HTTP status code means.

70 status codes

1xx Informational

The request was received and the process is continuing.

100

Continue

#

The server has received the request headers, and the client should send the request body. Used with an Expect: 100-continue header.

101

Switching Protocols

#

The server agrees to switch to the protocol the client asked for in the Upgrade header, for example from HTTP to WebSocket.

102

Processing

#

WebDAV: the server has accepted the request but hasn't finished it yet. Now deprecated.

103

Early Hints

#

Sent before the final response so the browser can start preloading resources listed in Link headers.

2xx Success

The request was received, understood and accepted.

200

OK

#

The request succeeded. The body contains the result, such as the page or the requested data.

201

Created

#

The request succeeded and created a new resource. The Location header usually points to it.

What to check: Typical response to a successful POST that creates something.

202

Accepted

#

The request was accepted for processing, but the work hasn't finished. Common for queued or background jobs.

203

Non-Authoritative Information

#

The response succeeded but was modified by a transforming proxy, so it isn't exactly what the origin server sent.

204

No Content

#

The request succeeded and there is no body to return. Common for DELETE requests and saved settings.

What to check: A 204 must not include a body; clients shouldn't try to parse one.

205

Reset Content

#

The request succeeded and the client should reset the document view, such as clearing a form.

206

Partial Content

#

The server is sending only part of the resource, as asked for with a Range header. Used for resumable downloads and video streaming.

207

Multi-Status

#

WebDAV: the body contains separate status codes for several operations.

208

Already Reported

#

WebDAV: members of a collection were already listed earlier in the same response.

226

IM Used

#

The server fulfilled the request and the response is the result of instance manipulations, such as a delta.

3xx Redirection

Further action is needed to complete the request, usually following a new URL.

300

Multiple Choices

#

The resource has several representations and the client or user should choose one.

301

Moved Permanently

#

The resource has a new permanent URL, given in the Location header. Browsers and search engines update to the new URL.

What to check: Use for permanent moves, such as http to https or an old page to a new one. Clients may change a POST to GET when following it; use 308 if the method must stay the same.

Read the full 301 guide →

302

Found

#

The resource is temporarily at a different URL. Future requests should still use the original URL.

What to check: Clients may change POST to GET when following a 302. Use 307 to keep the method.

Read the full 302 guide →

303

See Other

#

The client should get the result from another URL with a GET request. Often used after a form submission to avoid resubmitting.

304

Not Modified

#

The cached version is still valid, so the server sends no body. Used with If-None-Match or If-Modified-Since.

What to check: A normal part of caching, not an error.

305

Use Proxy

#

Deprecated. Told the client to use a proxy; browsers ignore it for security reasons.

307

Temporary Redirect

#

The resource is temporarily at another URL, and the client must repeat the request with the same method and body.

308

Permanent Redirect

#

The resource has permanently moved, and the client must repeat the request with the same method and body.

4xx Client error

The request has a problem, such as bad syntax, missing auth or a wrong URL.

400

Bad Request

#

The server can't process the request because of a client error, such as malformed syntax or invalid data.

What to check: Check the request body (for example invalid JSON), required parameters and the Content-Type header.

Read the full 400 guide →

401

Unauthorized

#

Authentication is required and has failed or hasn't been provided. Despite the name, it means unauthenticated.

What to check: Send valid credentials, such as an Authorization header with a current token. If the user is logged in but not allowed, the right code is 403.

Read the full 401 guide →

402

Payment Required

#

Reserved for future use. Some APIs use it when a plan limit is reached or payment is needed.

403

Forbidden

#

The server understood the request but refuses to allow it. Logging in again won't help.

What to check: The user is identified but lacks permission, or the server blocks access (file permissions, IP rules, a firewall or bot protection).

Read the full 403 guide →

404

Not Found

#

The server can't find the requested resource. The URL may be wrong or the page may have been removed.

What to check: Check the URL for typos, confirm the route or file exists, and add a redirect if the content moved. For an API, check the resource ID.

Read the full 404 guide →

405

Method Not Allowed

#

The HTTP method isn't supported for this URL, such as POST to a read-only endpoint. The Allow header lists valid methods.

406

Not Acceptable

#

The server can't produce a response matching the Accept headers the client sent.

407

Proxy Authentication Required

#

Like 401, but the client must first authenticate with a proxy.

409

Conflict

#

The request conflicts with the current state of the resource, such as editing an outdated version or creating a duplicate.

410

Gone

#

The resource has been permanently removed and won't come back. Search engines drop it faster than a 404.

411

Length Required

#

The server requires a Content-Length header, which the request didn't include.

412

Precondition Failed

#

A condition in the request headers, such as If-Match, wasn't met. Used to prevent overwriting newer changes.

413

Content Too Large

#

The request body is larger than the server allows. Formerly called Payload Too Large.

What to check: Reduce the upload size or raise the limit, such as client_max_body_size in nginx.

414

URI Too Long

#

The URL is longer than the server will process, often because too much data was put in the query string.

415

Unsupported Media Type

#

The server won't accept the request body's format.

What to check: Set the right Content-Type header, for example application/json when sending JSON.

416

Range Not Satisfiable

#

The Range header asks for part of the file that doesn't exist, such as beyond its end.

417

Expectation Failed

#

The server can't meet the requirement in the Expect header.

418

I'm a teapot

#

An April Fools' joke from RFC 2324: a teapot refusing to brew coffee. Not used in real HTTP, though some servers return it as an easter egg.

419

Page Expired

Unofficial · Laravel#

Laravel returns it when a form's CSRF token is missing or no longer matches the session, usually because the page was open longer than the session lasts. Reload the page and submit the form again.

420

Enhance Your Calm

Unofficial · Twitter#

Twitter's old API returned it when a client was rate limited. Current APIs, including X's, use 429 Too Many Requests instead.

421

Misdirected Request

#

The request reached a server that can't produce a response for this host, often due to reused HTTP/2 connections.

422

Unprocessable Content

#

The request is well formed but has semantic errors, such as failed validation. Formerly Unprocessable Entity.

What to check: Common in APIs for validation errors; the body usually explains which fields are wrong.

423

Locked

#

WebDAV: the resource is locked.

424

Failed Dependency

#

WebDAV: the request failed because an earlier request it depended on failed.

425

Too Early

#

The server won't process a request that might be replayed, such as one sent in TLS early data.

426

Upgrade Required

#

The client must switch to a different protocol, named in the Upgrade header.

428

Precondition Required

#

The server requires the request to be conditional, such as including If-Match, to avoid lost updates.

429

Too Many Requests

#

The client sent too many requests in a given time (rate limiting).

What to check: Slow down and retry after the time in the Retry-After header, if present. Use backoff and caching to send fewer requests.

Read the full 429 guide →

431

Request Header Fields Too Large

#

The request headers are too large, often because of too many or very large cookies.

What to check: Clear cookies for the site or reduce header size.

451

Unavailable For Legal Reasons

#

The resource can't be provided for legal reasons, such as a court order or government block.

499

Client Closed Request

Unofficial · nginx#

The client closed the connection before the server responded, for example a user cancelling or a client timeout.

5xx Server error

The server failed to handle a request that looks valid.

500

Internal Server Error

#

The server hit an unexpected condition and couldn't complete the request. A generic catch-all error.

What to check: Check the server logs for the exception or error message. Common causes are bugs, failed database queries and bad configuration.

Read the full 500 guide →

501

Not Implemented

#

The server doesn't support the functionality needed for the request, such as an unknown method.

502

Bad Gateway

#

A server acting as a gateway or proxy got an invalid response from the server behind it.

What to check: Usually the upstream app crashed, isn't running or returned something invalid. Check that the backend is up and the proxy points to the right address.

Read the full 502 guide →

503

Service Unavailable

#

The server can't handle the request right now, usually because it's overloaded or down for maintenance.

What to check: Often temporary; a Retry-After header may say when to retry. Check server load, maintenance mode and health checks.

Read the full 503 guide →

504

Gateway Timeout

#

A gateway or proxy didn't get a response from the server behind it in time.

What to check: The backend is too slow or unreachable. Look for slow queries or long-running requests, or raise the proxy timeout if the work really takes long.

Read the full 504 guide →

505

HTTP Version Not Supported

#

The server doesn't support the HTTP version used in the request.

506

Variant Also Negotiates

#

A server configuration error in content negotiation creates a circular reference.

507

Insufficient Storage

#

WebDAV: the server can't store what's needed to complete the request.

508

Loop Detected

#

WebDAV: the server found an infinite loop while processing the request.

510

Not Extended

#

Further extensions to the request are required. The specification behind it is now historic.

511

Network Authentication Required

#

The client must authenticate to get network access, as with Wi-Fi captive portals in hotels and airports.

520

Web Server Returned an Unknown Error

Unofficial · Cloudflare#

The origin server returned an empty, unknown or unexpected response to Cloudflare.

521

Web Server Is Down

Unofficial · Cloudflare#

Cloudflare couldn't connect because the origin server refused the connection.

522

Connection Timed Out

Unofficial · Cloudflare#

Cloudflare couldn't complete a TCP connection to the origin server in time.

523

Origin Is Unreachable

Unofficial · Cloudflare#

Cloudflare can't reach the origin server, for example because of a DNS problem.

524

A Timeout Occurred

Unofficial · Cloudflare#

Cloudflare connected to the origin, but it didn't send an HTTP response in time.

About the HTTP status code lookup

Every HTTP response starts with a three-digit status code that tells the client what happened: whether the request worked, was redirected, or failed because of the client or the server. Knowing what a code means is the fastest way to start debugging an API, a broken page or a redirect.

This reference lists every official status code from the IANA registry with its current name from RFC 9110, plus common unofficial codes from nginx and Cloudflare. Search by number or keyword, and see what to check for the errors you'll meet most often.

How to use the HTTP status code lookup

  1. Type a code such as 404, a range such as 5xx, or a word such as timeout or redirect.
  2. Or use the category buttons to show only 1xx, 2xx, 3xx, 4xx or 5xx codes.
  3. Read the meaning and, for common errors, what to check.
  4. Use the # link next to a code to share a direct link to it.

Examples

Search by number

Input

502

Output

502 Bad Gateway
A server acting as a gateway or proxy got an invalid response from the upstream server.
Common causes: the app behind nginx or a load balancer crashed, isn't listening on the expected port, or closed the connection.

Search by word

Input

rate

Output

429 Too Many Requests
The client sent too many requests in a given time. Check the Retry-After header before trying again.

Common errors and how to fix them

401 or 403: which one should my API return?

Return 401 when the request has no valid credentials, so logging in could help. Return 403 when the user is known but not allowed to do this.

Should a failed validation be 400 or 422?

Both are common. 400 fits malformed requests, like broken JSON; 422 fits well-formed requests whose values fail validation. Pick one and use it consistently.

Should I return 200 with an error message in the body?

No. Clients, caches and monitoring tools rely on the status code. Return a 4xx or 5xx code and put the details in the body.

Good to know

  • The first digit gives the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error.
  • 4xx errors mean the request needs to change, such as a wrong URL, missing login or invalid data. 5xx errors mean the server failed, so the same request may work later.
  • Codes marked Unofficial come from a specific product, such as nginx (499) or Cloudflare (520–524), and aren't part of the HTTP standard.
  • Some codes were renamed in RFC 9110: 413 is now Content Too Large and 422 is Unprocessable Content. Older tools may still show the previous names.

Frequently asked questions

What is the difference between 401 and 403?

401 Unauthorized means the request has no valid authentication, so logging in may fix it. 403 Forbidden means the server knows who you are but you don't have permission, so logging in again won't help.

Should I use 301 or 302 for a redirect?

Use 301 (or 308) when a page has moved permanently, so browsers and search engines update to the new URL. Use 302 (or 307) for temporary redirects. 307 and 308 also guarantee the request method doesn't change.

What is the difference between 502, 503 and 504?

All three come from a server or proxy in front of your app. 502 means it got an invalid response from the backend, 503 means the service is unavailable or overloaded, and 504 means the backend didn't respond in time.