HandyTools Hub

HTTP 状态码参考

浏览 HTTP 状态码(1xx–5xx)及其描述。

您的数据永远不会离开浏览器

100

Continue

The server has received the request headers and the client should proceed to send the request body.

101

Switching Protocols

The server is switching protocols as requested by the client, for example upgrading from HTTP to WebSocket.

102

Processing

The server has received and is processing the request, but no response is available yet (WebDAV).

103

Early Hints

Used to return some response headers before the final HTTP message, allowing the client to preload resources.

200

OK

The request has succeeded. The meaning depends on the HTTP method (GET, POST, PUT, DELETE, etc.).

201

Created

The request has been fulfilled and resulted in a new resource being created, typically after a POST request.

202

Accepted

The request has been accepted for processing but the processing has not been completed yet.

203

Non-Authoritative Information

The returned metadata may be from a third-party copy rather than the origin server.

204

No Content

The server successfully processed the request and is not returning any content body.

205

Reset Content

The server successfully processed the request and asks the client to reset the document view.

206

Partial Content

The server is delivering only part of the resource due to a range header sent by the client.

300

Multiple Choices

The request has more than one possible response. The user or user agent should choose one of them.

301

Moved Permanently

The URL of the requested resource has been changed permanently. The new URL is given in the response.

302

Found

The requested resource resides temporarily under a different URI. The client should continue to use the original URI.

303

See Other

The server sent this response to direct the client to get the requested resource at another URI with a GET request.

304

Not Modified

Indicates that the resource has not been modified since the version specified by the request headers (used for caching).

307

Temporary Redirect

The server sends this response to direct the client to a different URI, but the client must use the same HTTP method.

308

Permanent Redirect

The resource is now permanently located at another URI, and the client must use the same HTTP method for future requests.

400

Bad Request

The server cannot or will not process the request due to something that is perceived to be a client error (malformed syntax).

401

Unauthorized

The client must authenticate itself to get the requested response. Often called "unauthenticated" rather than "unauthorized".

403

Forbidden

The client does not have access rights to the content; the server is refusing to give the requested resource.

404

Not Found

The server can not find the requested resource. This is the most well-known HTTP error status code.

405

Method Not Allowed

The request method is known by the server but is not supported by the target resource.

408

Request Timeout

The server timed out waiting for the request from the client. The client may repeat the request without modifications.

409

Conflict

The request could not be completed due to a conflict with the current state of the target resource.

410

Gone

The requested content has been permanently deleted from the server, with no forwarding address.

413

Payload Too Large

The request entity is larger than limits defined by the server; the server might close the connection or return a Retry-After header.

414

URI Too Long

The URI requested by the client is longer than the server is willing to interpret.

415

Unsupported Media Type

The media format of the requested data is not supported by the server, so the server is rejecting the request.

418

I'm a teapot

The server refuses the attempt to brew coffee with a teapot. This is an April Fools joke from RFC 2324 (HTCPCP).

422

Unprocessable Entity

The request was well-formed but was unable to be followed due to semantic errors (WebDAV).

429

Too Many Requests

The user has sent too many requests in a given amount of time ("rate limiting"). The response should include a Retry-After header.

451

Unavailable For Legal Reasons

The server is denying access to the resource as a consequence of a legal demand (e.g., censorship or copyright).

500

Internal Server Error

The server has encountered a situation it does not know how to handle. This is a generic server error response.

501

Not Implemented

The request method is not supported by the server and cannot be handled. The server either does not recognize the request method or lacks the ability to fulfill it.

502

Bad Gateway

The server, while acting as a gateway or proxy, received an invalid response from the upstream server.

503

Service Unavailable

The server is not ready to handle the request. Common causes are server maintenance or temporary overloading.

504

Gateway Timeout

The server, while acting as a gateway or proxy, did not get a response in time from the upstream server.

HTTP 状态码速查是一份可搜索、按颜色分类的状态码大全。不用再翻枯燥的 RFC 文档,几秒钟就能搞清楚 418 或 307 到底是什么意思。适合调试接口的开发者、看服务器日志的运维,以及任何对着报错页面一脸懵的人。

如何使用

  • 浏览状态码: 按 1xx 到 5xx 分类滚动查看完整列表。
  • 搜索: 输入 502 这样的状态码,或 redirect 这样的关键词,实时过滤。
  • 筛选: 只看某一类——信息、成功、重定向、客户端错误或服务器错误。

功能特性

  • 收录全部标准 HTTP 状态码
  • 支持按状态码或描述搜索
  • 按类别筛选(1xx–5xx)
  • 分类配色,扫一眼就定位
  • 用大白话解释,不只是干巴巴的 RFC 术语

五类状态码到底在说什么

HTTP 状态码按首位数字分成五类,记住这五类比背单个码管用得多。1xx 是信息类,用户几乎看不到,比如升级到 WebSocket 时的 101。2xx 表示成功:200 是最常见的正常响应,201 表示资源已创建,204 表示成功但没有内容返回。

3xx 管重定向,其中 301(永久)和 302(临时)的区别对 SEO 影响很大——只有 301 会把原页面的权重传给新地址。4xx 是客户端的问题:400 请求格式错误、401 未登录、403 没权限、404 资源不存在、429 请求太频繁被限流。5xx 则是服务器自己出了状况:500 是笼统的内部错误,502 说明上游服务(比如反代后面的应用)响应异常,503 多半是服务临时不可用,常见于发布或维护期间。

使用场景

  • 解读第三方 API 返回的陌生错误码
  • 分析负载均衡和反向代理日志(502 还是 504)
  • 在客户端代码里写出正确的错误处理
  • 给新人讲 HTTP 基础知识

相关工具

常见问题

HTTP 状态码 404 是什么意思?

404 Not Found 表示服务器找不到请求的资源。

401 和 403 有什么区别?

401 表示需要先登录认证,403 表示已认证但没有访问权限。

503 错误是什么意思?

503 Service Unavailable 表示服务器暂时过载或在维护中,稍后重试一般就能恢复。

301 和 302 重定向有什么区别?

301 是永久重定向,会把 SEO 权重传递给新地址;302 是临时重定向,搜索引擎会继续保留原地址。