HTTP 状态码速查
完整的 HTTP 状态码速查表:1xx 到 5xx 的标准码与非标准码(418、429、451、499、599 等),支持按码或关键字搜索、按类别筛选并复制。
浏览器本地运行所有计算都在你的浏览器里完成,数据不会离开本机。
搜索状态码
共 65 条 / 65
100Continue标准中文含义服务器已收到请求头,客户端应继续发送请求体。
英文说明The server received the request headers; the client should continue sending the body.
101Switching Protocols标准中文含义服务器按客户端的 Upgrade 请求切换协议。
英文说明The server is switching protocols as requested by the client.
102Processing标准中文含义WebDAV:服务器已收到请求并正在处理,暂时没有响应。
英文说明WebDAV: the server has received the request and is still processing it.
103Early Hints标准中文含义在最终响应之前先返回资源预加载提示。
英文说明Returns resource hints before the final response.
200OK标准中文含义请求成功,响应内容在正文里。
英文说明The request succeeded and the response body carries the result.
201Created标准中文含义请求成功并创建了新资源,通常配合 Location 头返回新地址。
英文说明The request succeeded and a new resource was created; Location usually points to it.
202Accepted标准中文含义请求已被接受但尚未处理完成,结果稍后可用。
英文说明The request was accepted but processing is not finished yet.
203Non-Authoritative Information标准中文含义返回的元信息来自代理,不是源服务器的最新版本。
英文说明The returned metadata comes from a proxy rather than the origin server.
204No Content标准中文含义请求成功但正文为空,常用于删除或提交后的响应。
英文说明The request succeeded but there is no body to return.
205Reset Content标准中文含义请求成功,客户端应重置当前文档的视图(如表单)。
英文说明The client should reset the document view, for example a form.
206Partial Content标准中文含义断点续传:只返回了资源的一部分。
英文说明Range request: only a part of the resource is returned.
207Multi-Status标准中文含义WebDAV:多个子请求各有自己的状态码。
英文说明WebDAV: several sub-requests each carry their own status.
208Already Reported标准中文含义WebDAV:同一集合里的成员已经在前面的响应里报告过。
英文说明WebDAV: the members were already reported in an earlier part of the response.
226IM Used标准中文含义服务器已完成实例操纵,返回增量结果。
英文说明The server fulfilled the request using instance manipulations.
300Multiple Choices标准中文含义请求的资源有多种表示,需要客户端选择。
英文说明The resource has multiple representations and the client should choose one.
301Moved Permanently标准中文含义资源永久重定向到新地址,搜索引擎会更新索引。
英文说明The resource moved permanently; search engines update their index.
302Found标准中文含义资源临时重定向到另一个地址。
英文说明Temporary redirect to another address.
303See Other标准中文含义重定向到另一个地址,并且应该改用 GET 获取结果。
英文说明Redirect to another address, which should be fetched with GET.
304Not Modified标准中文含义命中协商缓存,资源没有变化,直接使用本地副本。
英文说明Conditional cache hit: the resource is unchanged, use the local copy.
305Use Proxy非标准中文含义已弃用:要求通过代理访问资源。
英文说明Deprecated: the resource must be accessed through a proxy.
306Unused非标准中文含义已废弃:历史遗留的状态码,保留未用。
英文说明Deprecated: a historical code that is reserved and unused.
307Temporary Redirect标准中文含义临时重定向,但必须保持原来的请求方法。
英文说明Temporary redirect that must keep the original request method.
308Permanent Redirect标准中文含义永久重定向,同样必须保持原来的请求方法。
英文说明Permanent redirect that must keep the original request method.
400Bad Request标准中文含义请求语法错误或参数不合法,服务器无法处理。
英文说明The request is malformed or the parameters are invalid.
401Unauthorized标准中文含义未认证:需要先登录或提供有效的凭证。
英文说明Not authenticated: sign in or provide valid credentials first.
402Payment Required标准中文含义预留状态码,常被用于需要付费才能访问的场景。
英文说明Reserved; often used for APIs that require payment.
403Forbidden标准中文含义已认证但没有访问权限。
英文说明Authenticated but not allowed to access the resource.
404Not Found标准中文含义请求的资源不存在。
英文说明The requested resource does not exist.
405Method Not Allowed标准中文含义资源存在,但不支持这个请求方法。
英文说明The resource exists but does not support this HTTP method.
406Not Acceptable标准中文含义无法返回符合 Accept 头要求的响应。
英文说明No representation matches the Accept header.
407Proxy Authentication Required标准中文含义需要先通过代理服务器认证。
英文说明The request must authenticate with the proxy first.
408Request Timeout标准中文含义服务器等待请求超时,客户端可以重试。
英文说明The server timed out waiting for the request.
409Conflict标准中文含义请求与资源当前状态冲突,例如并发写入。
英文说明The request conflicts with the current state of the resource.
410Gone标准中文含义资源曾经存在但已被永久删除。
英文说明The resource existed but has been permanently removed.
411Length Required标准中文含义缺少 Content-Length 头。
英文说明The Content-Length header is required.
412Precondition Failed标准中文含义条件请求的预置条件(If-Match 等)不满足。
英文说明A precondition such as If-Match failed.
413Content Too Large标准中文含义请求体超过服务器允许的大小。
英文说明The request body exceeds the size the server accepts.
414URI Too Long标准中文含义请求的 URL 太长。
英文说明The request URL is too long.
415Unsupported Media Type标准中文含义请求体的媒体类型不被支持。
英文说明The media type of the request body is not supported.
416Range Not Satisfiable标准中文含义请求的字节范围无法满足。
英文说明The requested byte range cannot be satisfied.
417Expectation Failed标准中文含义Expect 头里的期望不能满足。
英文说明The expectation given in the Expect header cannot be met.
418I'm a teapot非标准中文含义愚人节彩蛋状态码:服务器是一把茶壶,不能煮咖啡。
英文说明April Fools code: the server is a teapot and cannot brew coffee.
421Misdirected Request标准中文含义请求被发给了无法为该域名提供服务的服务器。
英文说明The request was directed at a server that cannot serve this host.
422Unprocessable Content标准中文含义请求格式正确但语义有误,无法处理。
英文说明The request is well-formed but semantically invalid.
423Locked标准中文含义WebDAV:资源已被锁定。
英文说明WebDAV: the resource is locked.
424Failed Dependency标准中文含义WebDAV:前置请求失败,本次请求无法完成。
英文说明WebDAV: the request failed because a previous request failed.
425Too Early标准中文含义服务器不愿处理可能被重放的早期请求。
英文说明The server is unwilling to process a request that might be replayed.
426Upgrade Required标准中文含义需要升级到其他协议才能继续。
英文说明The client should switch to another protocol.
428Precondition Required标准中文含义要求请求带上条件头,避免并发覆盖。
英文说明The origin server requires the request to be conditional.
429Too Many Requests标准中文含义短时间内请求过多,已被限流,请稍后重试。
英文说明Too many requests in a short time: rate limited.
431Request Header Fields Too Large标准中文含义请求头总大小超出限制。
英文说明The request header fields are too large.
451Unavailable For Legal Reasons标准中文含义因法律原因无法提供该资源。
英文说明The resource cannot be provided for legal reasons.
499Client Closed Request非标准中文含义非标准(nginx):客户端在服务器响应前断开了连接。
英文说明Non-standard (nginx): the client closed the connection before the response.
500Internal Server Error标准中文含义服务器内部错误,通常是代码异常。
英文说明An unexpected error occurred on the server.
501Not Implemented标准中文含义服务器不支持该请求需要的功能。
英文说明The server does not support the functionality required.
502Bad Gateway标准中文含义网关或代理从上游收到了无效响应。
英文说明The gateway received an invalid response from the upstream server.
503Service Unavailable标准中文含义服务暂时不可用,通常是过载或维护中。
英文说明The server is temporarily unavailable, for example overloaded or in maintenance.
504Gateway Timeout标准中文含义网关等待上游响应超时。
英文说明The gateway timed out waiting for the upstream server.
505HTTP Version Not Supported标准中文含义服务器不支持请求使用的 HTTP 版本。
英文说明The HTTP protocol version used in the request is not supported.
506Variant Also Negotiates标准中文含义内容协商配置错误,导致循环引用。
英文说明Transparent content negotiation results in a circular reference.
507Insufficient Storage标准中文含义WebDAV:服务器存储空间不足。
英文说明WebDAV: the server cannot store the representation needed.
508Loop Detected标准中文含义WebDAV:处理请求时检测到死循环。
英文说明WebDAV: an infinite loop was detected while processing the request.
510Not Extended标准中文含义需要对请求做进一步扩展才能满足策略。
英文说明Further extensions to the request are required.
511Network Authentication Required标准中文含义需要先通过网络的认证(例如公共 Wi-Fi 登录)。
英文说明The client needs to authenticate, for example on a captive portal.
599Network Connect Timeout Error非标准中文含义非标准:代理连接上游超时(常见于 nginx 日志)。
英文说明Non-standard: the proxy timed out connecting upstream.
这个工具能做什么
- 接口返回了一个没见过的状态码,或者日志里全是 4xx/5xx,快速查它的标准原因短语和中英文含义,判断责任在客户端还是服务端。
- 准备 API 文档或错误码表时,直接抄标准原因短语(404 Not Found、429 Too Many Requests),避免自造写法。
- 看 nginx access log 时确认 499、599 这类非标准码的来源(都是 nginx 自己的约定,不是 RFC 定义)。
- 教别人 HTTP 时按类别(1xx/2xx/3xx/4xx/5xx)浏览,从 4xx 里分清「没认证(401)」和「没权限(403)」。
示例
输入
404
输出
404 Not Found 请求的资源不存在。 类别:4xx 客户端错误 · 标准状态码
纯数字输入会先精确匹配,再退化为前缀匹配:输入 404 只返回这一条,输入 4 会列出全部 30 条 4xx。要按关键字查就输入英文单词或中文,例如 timeout 会命中 408、504、599。
常见问题
401 和 403 到底有什么区别?
401 Unauthorized 是「还没认证」,服务端会带 WWW-Authenticate 头告诉你该怎么认证;403 Forbidden 是「已经认证了但没权限」,再登录也没用。名字上 401 更准确的叫法其实是 Unauthenticated,这是规范里的历史遗留。
4xx 和 5xx 的责任该怎么划?
4xx 表示请求本身有问题,重试同样的请求通常还是失败,要先改请求;5xx 表示服务端出错,客户端可以按退避策略重试。502/504 一般出在网关到上游这一段,429 和 503 都会带 Retry-After 告诉你等多久。
为什么 418、499、599 标着「非标准」?
因为它们不在 IETF 注册表里。418 I'm a teapot 是 1998 年愚人节 RFC 2324 留下的彩蛋;499 与 599 是 nginx 自己定义的(客户端提前断开、代理连接上游超时),只应在日志里出现,别写进对外 API。
304 为什么没有响应体?
304 Not Modified 是协商缓存的结果:浏览器带 If-None-Match 或 If-Modified-Since 去问,服务端发现资源没变,就只回一个 304 让浏览器用本地副本,省下重新传输的流量。所以它既没有正文,通常也没有 Content-Type。
搜索时中文关键词能用吗?
能。非数字输入会在原因短语、中文含义和英文说明三处做不区分大小写的包含匹配,所以搜「重定向」「超时」「限流」都能命中相关状态码。数字输入则走精确匹配与前缀匹配,混着字母(如 4xx)不会命中。
关键词:httpstatus code状态码http 状态码404500http status响应码rest