HTTP STATUS CODES
HTTP status codes, meaning and fixes in one place.
Browse common HTTP status codes from 1xx to 5xx with standard meaning, use cases and troubleshooting tips. Runs locally in your browser.
31 codes
Most tools process data locally; see this page for details
What can this tool do?
A reference of common HTTP status codes from 1xx to 5xx, each with its standard name, meaning, typical scenario and troubleshooting advice. Filter by category (informational / success / redirection / client error / server error) or search by code, English name or meaning — try 404, not found or redirect. Use the copy button beside a code to grab the value quickly when debugging APIs. Everything runs locally.
FAQ
What is the difference between 301 and 302?
301 is a permanent redirect: browsers and search engines remember it and send later requests straight to the new address. 302 is temporary and the target is not cached. Use 301 for moved URLs, 302 for temporary jumps such as post-login returns.
How do I tell 401 from 403?
401 means unauthenticated — the server is asking who you are and normally returns a challenge header. 403 means you were recognised but refused: insufficient permission. Return 401 when not logged in, 403 when logged in but not allowed.
示例与注意事项Example & notes
一个例子A worked example
排查接口 502:输入 502 直接看到「Bad Gateway——上游服务器返回了无效响应」的含义与常见成因(后端服务挂了、反代配置错、连接超时),以及排查顺序。Debugging a 502: enter 502 and you get what "Bad Gateway — the upstream server returned an invalid response" means, its usual causes (backend down, proxy misconfigured, timeout) and a sensible order to check them.
注意事项Things to watch
- 状态码分五类:1xx 信息、2xx 成功、3xx 跳转、4xx 客户端问题、5xx 服务端问题;4xx 改请求,5xx 查服务端。Codes come in five families: 1xx info, 2xx success, 3xx redirect, 4xx client-side, 5xx server-side; fix the request for 4xx, the server for 5xx.
- 301 与 302 是临时/永久跳转的不同,308/307 保留了请求方法(POST 仍是 POST),做接口迁移时要留意。301 vs 302 differ in permanence, and 308/307 preserve the request method (a POST stays a POST) — relevant when migrating an API.
- 429 表示被限流,重试要带退避间隔;带 Retry-After 头时优先按它等待。429 means rate limited: retry with backoff, and honour a Retry-After header when present.
相关问答More Q&A
404 和 403 到底差在哪?What is the difference between 404 and 403?
404 是服务器认为这个资源不存在(或不允许暴露其存在),403 是资源确实存在但你没有被授权访问。排查时先确认路径拼写与大小写,再看鉴权配置。404 means the server considers the resource absent (or will not reveal that it exists); 403 means it exists but you are not allowed. Check the path and its case first, then the authorization setup.
为什么同一个接口有时 200 有时 502?Why does the same endpoint sometimes return 200 and sometimes 502?
多半是后端实例不稳定或反代负载均衡把请求转到了已经挂掉的节点。看错误日志里的上游地址能定位到具体节点;偶发 502 通常还需要加上健康检查与自动摘除。Usually an unstable backend or a proxy forwarding to a dead node. The upstream address in the error log identifies the node; intermittent 502s also call for health checks with automatic removal.