HTTP Status Codes
Every status code currently registered in the IANA HTTP Status Code Registry, including the 1xx informational codes, the 2xx success codes, the 3xx redirection codes, the full set of 4xx client errors and 5xx server errors, and the WebDAV extensions. Each entry cites the defining RFC and lists common causes you'd see in production.
Quick fetch
Stable, immutable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/http-status-codes.json
Or use as a typed import:
import { httpStatusCodes } from "https://staticdata.dev/v1/http-status-codes.ts"
Formats
- JSON 19.1 KB
/v1/http-status-codes.json
min: 15.6 KB · /v1/http-status-codes.min.json
- CSV 10.6 KB
/v1/http-status-codes.csv
- TypeScript 19.3 KB
/v1/http-status-codes.ts
export const httpStatusCodes
type HttpStatusCode = (typeof httpStatusCodes)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| code | number | Numeric status code | 200 |
| name | string | Reason phrase | OK |
| category | string | Class of response | 2xx Success |
| description | string | What the status indicates | The request has succeeded. |
| specification | string | RFC defining or last revising the status | RFC 9110 |
| commonCauses | string[] | Typical real-world causes | ["Client included an Expect: 100-continue header"] |
Preview
First 10 records.
| code | name | category | description | specification |
|---|---|---|---|---|
| 100 | Continue | 1xx Informational | The server has received the request headers and the client should proceed to send the request body. | RFC 9110 |
| 101 | Switching Protocols | 1xx Informational | The server is switching protocols as requested by the client via the Upgrade header. | RFC 9110 |
| 102 | Processing | 1xx Informational | WebDAV: The server has received and is processing the request, but no response is available yet. | RFC 2518 |
| 103 | Early Hints | 1xx Informational | Used to return some response headers before final HTTP message. | RFC 8297 |
| 200 | OK | 2xx Success | The request has succeeded. The information returned with the response is dependent on the method used in the request. | RFC 9110 |
| 201 | Created | 2xx Success | The request has been fulfilled and resulted in a new resource being created. | RFC 9110 |
| 202 | Accepted | 2xx Success | The request has been accepted for processing, but the processing has not been completed. | RFC 9110 |
| 203 | Non-Authoritative Information | 2xx Success | The server is a transforming proxy that received a 200 OK from its origin, but is returning a modified version of the origin's response. | RFC 9110 |
| 204 | No Content | 2xx Success | The server successfully processed the request and is not returning any content. | RFC 9110 |
| 205 | Reset Content | 2xx Success | The server successfully processed the request, but is not returning any content. The user agent should reset the document view. | RFC 9110 |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/http-status-codes.json | jq '.[0]' import type { HttpStatusCode } from "https://staticdata.dev/v1/http-status-codes.ts";
const res = await fetch("https://staticdata.dev/v1/http-status-codes.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const httpStatusCodes: HttpStatusCode[] = await res.json();
console.log(httpStatusCodes[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/http-status-codes.min.json") as r:
httpStatusCodes = json.load(r)
print(httpStatusCodes[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/http-status-codes.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/http-status-codes.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
The dataset covers all codes registered with IANA. RFC 9110 supersedes RFC 7231 and the older HTTP/1.1 RFCs as the single source of truth for the core HTTP semantics; codes still defined only in their original specifications (102 Processing in RFC 2518, 103 Early Hints in RFC 8297, 418 I’m a teapot in RFC 2324, 451 Unavailable for Legal Reasons in RFC 7725) cite the defining document directly.
Some codes have been removed or are deprecated (305 Use Proxy is deprecated for security reasons; 306 was reserved and never used). They are kept in the dataset for historical accuracy and labelled in the description.
The commonCauses array is opinionated: it lists the most likely real-world reasons you would see this status in production logs. It is not exhaustive.
Versioning
URLs under /v1/ are immutable. The data they return will not change in a way
that breaks consumers. Schema-incompatible updates ship under a new version path. See the
http-status-codes changelog for this dataset's history.