HTTP 狀態碼

完整 HTTP 狀態碼速查表,可按編號搜尋。

1xx Informational

100
Continue
The initial part of a request was received, please continue.
101
Switching Protocols
The server is switching protocols as requested by the client.

2xx Success

200
OK
The request has succeeded.
201
Created
The request has been fulfilled and a new resource was created.
202
Accepted
The request has been accepted for processing.
204
No Content
The request was successful but there is no content to return.
206
Partial Content
Partial content delivered as requested by a Range header.

3xx Redirection

301
Moved Permanently
The resource has been moved to a new URL permanently.
302
Found
The resource is temporarily located at a different URL.
304
Not Modified
Cached version is still valid; no body returned.
307
Temporary Redirect
Same as 302 but the method must not change.
308
Permanent Redirect
Same as 301 but the method must not change.

4xx Client Error

400
Bad Request
The server cannot process the request due to a client error.
401
Unauthorized
Authentication is required and has failed or not been provided.
403
Forbidden
The server understood the request but refuses to authorize it.
404
Not Found
The requested resource could not be found.
405
Method Not Allowed
The request method is not supported for this resource.
408
Request Timeout
The server timed out waiting for the request.
409
Conflict
The request conflicts with the current state of the resource.
410
Gone
The resource is no longer available and will not be available again.
413
Payload Too Large
The request body is larger than the server is willing to process.
415
Unsupported Media Type
The media type is not supported by the server.
422
Unprocessable Entity
The request was well-formed but contained semantic errors.
429
Too Many Requests
The user has sent too many requests in a given time (rate limited).

5xx Server Error

500
Internal Server Error
A generic server error.
501
Not Implemented
The server does not support the functionality required.
502
Bad Gateway
Invalid response from an upstream server.
503
Service Unavailable
The server is overloaded or down for maintenance.
504
Gateway Timeout
Upstream server failed to respond in time.
隱私安全全部在瀏覽器本機完成,資料不上傳
簡單易用貼上或輸入即可,結果即時呈現
永久免費不限次數,無需註冊
快速高效先進技術,處理高效穩定

當一個 API 或頁面只回了一個數字,比如 404 或 502,其實它已經準確告訴了你哪裡出了問題,前提是你認得這個碼。本工具是一份完整、可搜尋的 HTTP 狀態碼參考,按類別分組,讓你查一個碼就能判斷問題出在你的請求、伺服器,還是只是一次重新導向。

4044xx
狀態碼 → 含義

使用步驟: HTTP 狀態碼

  1. 1輸入內容在搜尋框中輸入狀態碼數字或關鍵字(例如 404 或 Not Found)。
  2. 2設定選項在篩選後的清單中找到對應的 HTTP 狀態碼。
  3. 3開始處理閱讀它所屬的類別(1xx-5xx)與清楚的說明。
  4. 4取得結果複製狀態碼或說明,用於撰寫文件或排查 API 問題。

常見用途

排查 API 呼叫查一下請求回傳的狀態碼,看是該修請求還是修伺服器。
選對要回傳的狀態為自己的介面選擇正確的狀態碼,而不是一律回傳 200 或 500。
讀懂伺服器記錄一眼看明白存取記錄裡那一串狀態數字的含義。
分清 401 與 403當兩個相近的碼容易混淆時,核對它們的確切含義。

使用提示

首位數字代表類別1xx 是資訊,2xx 成功,3xx 重新導向,4xx 是你的請求,5xx 是伺服器。單看首位就知道該往哪邊查。
401 不是 403401 表示你尚未通過身分驗證,403 表示你已通過驗證但沒有權限,兩者需要不同的處理。
有些碼很少見或非官方你偶爾會遇到像 418 這樣的玩笑碼或廠商自訂碼,不要圍繞這些冷僻的碼去寫邏輯。
狀態碼是線索,不是全部數字能把範圍縮小,但真正的錯誤細節往往在回應內文裡,兩者要一起看。

常見問題