網頁與驗證

HTTP 狀態碼參考 - 完整狀態碼指南

免費線上 HTTP 狀態碼參考工具。搜尋和瀏覽所有 HTTP 回應狀態碼,包含描述、分類和常見使用場景。

免費使用 無需註冊 在瀏覽器中執行

工具工作區

1xx Informational

100
Continue

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

101
Switching Protocols

The server is switching protocols as requested (e.g., WebSocket upgrade).

2xx Success

200
OK

The request succeeded. Standard response for successful HTTP requests.

201
Created

The request succeeded and a new resource was created. Common after POST requests.

204
No Content

The request succeeded but there is no content to return. Common for DELETE.

206
Partial Content

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

3xx Redirection

301
Moved Permanently

The resource has been permanently moved to a new URL. Use for SEO redirects.

302
Found

The resource is temporarily at a different URL. Often used in OAuth redirects.

304
Not Modified

The resource has not been modified since the last request. Use cached version.

307
Temporary Redirect

Like 302 but preserves the HTTP method. Used in HSTS redirects.

308
Permanent Redirect

Like 301 but preserves the HTTP method.

4xx Client Error

400
Bad Request

The server cannot process the request due to invalid syntax or parameters.

401
Unauthorized

Authentication is required. The client must provide valid credentials.

403
Forbidden

The client does not have permission to access the resource, even with auth.

404
Not Found

The requested resource does not exist on the server.

405
Method Not Allowed

The HTTP method is not supported for the requested resource.

409
Conflict

The request conflicts with the current state of the resource.

410
Gone

The resource is permanently gone and will not be available again.

413
Payload Too Large

The request body exceeds the server limit.

415
Unsupported Media Type

The media type in the request is not supported by the server.

422
Unprocessable Entity

The request is well-formed but contains semantic errors (used in APIs).

429
Too Many Requests

The user has sent too many requests in a given time. Rate limiting.

5xx Server Error

500
Internal Server Error

Generic server error. Something unexpected went wrong.

502
Bad Gateway

The server received an invalid response from an upstream server.

503
Service Unavailable

The server is temporarily unable to handle the request (maintenance/overload).

504
Gateway Timeout

The upstream server did not respond in time.

什麼是 HTTP 狀態碼?

HTTP 狀態碼是 Web 伺服器在回應客戶端請求時返回的三位數字。它們指示請求是否成功、被重定向、導致客戶端錯誤還是引起伺服器錯誤。狀態碼分為五個類別:1xx(資訊性)、2xx(成功)、3xx(重定向)、4xx(客戶端錯誤)和 5xx(伺服器錯誤)。理解這些狀態碼對於需要建構、除錯和監控 Web 應用程式和服務的 Web 開發人員、API 設計者和系統管理員來說至關重要。

如何使用 HTTP 狀態碼參考

  1. 1瀏覽按類別(1xx 到 5xx)組織的完整 HTTP 狀態碼列表。
  2. 2使用搜尋框按數字、名稱或描述過濾狀態碼——例如,輸入 '404' 或 'redirect'。
  3. 3每個狀態碼顯示其數字程式碼、官方名稱以及何時和如何使用的簡明描述。
  4. 4顏色編碼的類別使你能輕鬆區分成功(綠色)、重定向(黃色)、客戶端錯誤(橙色)和伺服器錯誤(紅色)。
  5. 5在除錯 API 回應、配置 Web 伺服器或編寫錯誤處理邏輯時使用此參考。

HTTP 狀態碼參考 - 完整狀態碼指南的常見使用情境

快速完成日常任務

無需安裝桌面軟體,打開網頁即可處理常見的文字、圖片、資料或格式轉換工作。

檢查與整理內容

在提交檔案、發布內容或複製結果之前,快速發現格式問題並取得結構清楚的輸出。

重視隱私的瀏覽器處理

對於支援本機執行的工具,資料會留在目前瀏覽器中,不需要上傳到第三方服務。

常見問題

401 和 403 有什麼區別?

401 Unauthorized 表示請求缺少有效的認證憑據——使用者需要登入。403 Forbidden 表示伺服器理解了請求且使用者可能已透過認證,但沒有許可權訪問該資源。

什麼時候應該使用 200、201 還是 204?

200 OK 用於成功的 GET 請求和一般性成功。201 Created 用於成功建立新資源的 POST 請求之後。204 No Content 用於不返回回應體的成功請求,如 DELETE 操作。

301 和 308 重定向有什麼區別?

兩者都是永久重定向。301 允許客戶端更改 HTTP 方法(例如,POST 可能變為 GET)。308 要求客戶端保留原始 HTTP 方法。對於大多數網站重定向,301 是標準選擇;308 在需要保持方法不變時使用。

支援哪些輸入格式與使用限制?

請依頁面上的欄位、範例值和接受格式準備輸入。若內容很大、格式不完整,或超出瀏覽器可處理的記憶體與效能範圍,工具可能需要更久才能完成;在複製、下載或貼回專案前,請先確認輸出符合你的目標系統要求。