HTTP 狀態碼大全(速查表)
60+ 個 HTTP 狀態碼一頁完整列出,5 大類別(**1xx 資訊 / 2xx 成功 / 3xx 重導 / 4xx 客戶端錯誤 / 5xx 伺服器錯誤**)可過濾,輸入數字前綴或關鍵字即時搜尋,附 RFC 參考與常見誤用提示(401 vs 403、302 vs 307 等)。
61 / 61 個狀態碼
ContinueRFC 9110 §15.2.1
Server received request headers; client should proceed with the body.
Switching ProtocolsRFC 9110 §15.2.2
Server is switching protocols as requested by Upgrade.
Processing (WebDAV)RFC 2518
Server has accepted and is processing — no response yet.
Early HintsRFC 8297
Lets the client start preloading resources before the final response.
OKRFC 9110 §15.3.1
Standard success. Body contains the requested representation.
CreatedRFC 9110 §15.3.2
Resource created; Location header should point to it.
AcceptedRFC 9110 §15.3.3
Request accepted for processing, not yet complete.
Non-Authoritative InformationRFC 9110 §15.3.4
Meta is from a transforming proxy, not origin.
No ContentRFC 9110 §15.3.5
Success with no body. Common for DELETE / PUT.
Reset ContentRFC 9110 §15.3.6
Success; client should reset its document view.
Partial ContentRFC 9110 §15.3.7
Range request succeeded — see Content-Range.
Multi-Status (WebDAV)RFC 4918
Body contains XML status per resource.
Already Reported (WebDAV)RFC 5842
Members previously enumerated; omitted here.
IM UsedRFC 3229
Delta encoding result.
Multiple ChoicesRFC 9110 §15.4.1
Multiple representations available; agent or user should pick.
Moved PermanentlyRFC 9110 §15.4.2
Permanent redirect; caches should update. Method may change to GET in practice.
FoundRFC 9110 §15.4.3
Temporary redirect. Browsers commonly change POST → GET — use 307 if you don't want that.
⚠ For POST → GET preservation use 307.
See OtherRFC 9110 §15.4.4
After a POST, redirect to a GET that fetches the result.
Not ModifiedRFC 9110 §15.4.5
Conditional GET cache hit. No body.
Temporary RedirectRFC 9110 §15.4.8
Like 302 but **preserves the method** (POST stays POST).
Permanent RedirectRFC 9110 §15.4.9
Like 301 but **preserves the method**.
Bad RequestRFC 9110 §15.5.1
Malformed syntax or invalid request framing.
UnauthorizedRFC 9110 §15.5.2
Authentication required or invalid. Despite the name, this is about **authentication**, not authorization.
⚠ Use 403 when the user is authenticated but not allowed.
Payment RequiredRFC 9110 §15.5.3
Reserved for future commercial use.
ForbiddenRFC 9110 §15.5.4
Authenticated but not authorized for this resource.
Not FoundRFC 9110 §15.5.5
Resource doesn't exist (or you want to hide its existence — see 401 / 403 nuance).
Method Not AllowedRFC 9110 §15.5.6
URL exists, but not for this HTTP method. Must include Allow header.
Not AcceptableRFC 9110 §15.5.7
Couldn't satisfy Accept-* negotiation.
Proxy Authentication RequiredRFC 9110 §15.5.8
Authenticate with proxy first.
Request TimeoutRFC 9110 §15.5.9
Client took too long to send the request.
ConflictRFC 9110 §15.5.10
Conflict with current state (e.g. duplicate primary key).
GoneRFC 9110 §15.5.11
Removed deliberately; tell crawlers to drop the URL.
Length RequiredRFC 9110 §15.5.12
Missing Content-Length.
Precondition FailedRFC 9110 §15.5.13
If-Match / If-Unmodified-Since failed — optimistic locking miss.
Content Too LargeRFC 9110 §15.5.14
Body exceeds server limit (renamed from 'Payload Too Large').
URI Too LongRFC 9110 §15.5.15
URL longer than server can process.
Unsupported Media TypeRFC 9110 §15.5.16
Content-Type not supported by the endpoint.
Range Not SatisfiableRFC 9110 §15.5.17
Asked for a byte range outside the resource.
Expectation FailedRFC 9110 §15.5.18
Expect header can't be met.
I'm a teapotRFC 2324
April fool from RFC 2324; never standardised, but used in the wild.
Misdirected RequestRFC 9110 §15.5.20
Request sent to a server that can't produce a response for it.
Unprocessable ContentRFC 9110 §15.5.21
Syntax OK, semantics wrong (validation failure). Popular in JSON APIs.
Locked (WebDAV)RFC 4918
Resource is locked.
Failed Dependency (WebDAV)RFC 4918
A previous request failed, so this one cannot succeed.
Too EarlyRFC 8470
Server unwilling to process a replayed request.
Upgrade RequiredRFC 9110 §15.5.22
Client must switch protocols (e.g. TLS) and retry.
Precondition RequiredRFC 6585
Server requires an If-Match etc. to avoid lost updates.
Too Many RequestsRFC 6585
Rate limited. Read Retry-After.
Request Header Fields Too LargeRFC 6585
Headers (or a single one) exceed server limit.
Unavailable For Legal ReasonsRFC 7725
Blocked due to legal demand (named after Fahrenheit 451).
Internal Server ErrorRFC 9110 §15.6.1
Generic server failure. The default catch-all.
Not ImplementedRFC 9110 §15.6.2
Server doesn't support the requested method.
Bad GatewayRFC 9110 §15.6.3
Upstream returned an invalid response to a gateway.
Service UnavailableRFC 9110 §15.6.4
Overloaded or maintenance. Should send Retry-After.
Gateway TimeoutRFC 9110 §15.6.5
Upstream didn't respond in time.
HTTP Version Not SupportedRFC 9110 §15.6.6
Major HTTP version not supported.
Variant Also NegotiatesRFC 2295
Transparent content negotiation cycle.
Insufficient Storage (WebDAV)RFC 4918
Server can't store the representation.
Loop Detected (WebDAV)RFC 5842
Infinite loop in resolution.
Not ExtendedRFC 2774
Further extensions required.
Network Authentication RequiredRFC 6585
Captive portal — sign in to the network.
›如何使用
- 輸入 數字前綴(
40→ 列出 400-409、5→ 列出 5xx)或 關鍵字(teapot、rate limited、redirect)即時過濾。 - 上方類別 chip 可勾選 / 取消 五大類別(1xx / 2xx / 3xx / 4xx / 5xx),配合搜尋一起用。
- 點任一狀態碼數字框 一鍵複製 數字到剪貼簿(方便貼到 IDE / Postman / Slack 回覆)。
- 看到 ⚠ 提示就是常見誤用 — 例如 401 跟 403 的差別(authentication vs authorization)、302 vs 307 的方法保留行為。
Tips
- 401 vs 403:401 是「沒登入」,403 是「登入了但沒權限」— 後端常寫反,前端也常誤判。
- 302 vs 307:302 在實務上會把 POST → GET(歷史包袱),要保留方法請用 307;308 是永久版的 307。
- 422 Unprocessable Content 是 JSON API 驗證失敗的常用選擇(語法 OK 但語意錯) — 比 400 更精確。
- 429 Too Many Requests 一定要回 Retry-After header,讓 client 知道何時可重試。
💡 完全離線資料,不會發任何網路請求 — 即便斷網仍可查。資料源:RFC 9110、RFC 7725、IANA registry。