Character Encodings
258 IANA-registered character sets sourced from the official IANA Character Sets registry. Each entry includes the canonical name, the numeric MIBenum identifier assigned by IANA, the preferred MIME name used in HTTP and email headers, and an array of all known aliases such as legacy IBM code page names, ISO designations, and IETF labels.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/character-encodings.json
Or use as a typed import:
import { characterEncodings } from "https://staticdata.dev/v1/character-encodings.ts"
Formats
- JSON 39.0 KB
/v1/character-encodings.json
min: 25.9 KB · /v1/character-encodings.min.json
- CSV 11.6 KB
/v1/character-encodings.csv
- TypeScript 39.2 KB
/v1/character-encodings.ts
export const characterEncodings
type CharacterEncoding = (typeof characterEncodings)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| name | string | Canonical IANA character set name | US-ASCII |
| mibEnum | number | Numeric MIBenum identifier assigned by IANA | 3 |
| aliases | string[] | Known aliases including legacy and vendor names | ["csASCII","ANSI_X3.4-1968"] |
| preferredMime | string | null | Preferred MIME name for use in HTTP and email headers | US-ASCII |
Preview
First 10 records.
| name | mibEnum | preferredMime |
|---|---|---|
| US-ASCII | 3 | US-ASCII |
| ISO_8859-1:1987 | 4 | ISO-8859-1 |
| ISO_8859-2:1987 | 5 | ISO-8859-2 |
| ISO_8859-3:1988 | 6 | ISO-8859-3 |
| ISO_8859-4:1988 | 7 | ISO-8859-4 |
| ISO_8859-5:1988 | 8 | ISO-8859-5 |
| ISO_8859-6:1987 | 9 | ISO-8859-6 |
| ISO_8859-7:1987 | 10 | ISO-8859-7 |
| ISO_8859-8:1988 | 11 | ISO-8859-8 |
| ISO_8859-9:1989 | 12 | ISO-8859-9 |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/character-encodings.json | jq '.[0]' import type { CharacterEncoding } from "https://staticdata.dev/v1/character-encodings.ts";
const res = await fetch("https://staticdata.dev/v1/character-encodings.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const characterEncodings: CharacterEncoding[] = await res.json();
console.log(characterEncodings[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/character-encodings.min.json") as r:
characterEncodings = json.load(r)
print(characterEncodings[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/character-encodings.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/character-encodings.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
The data is sourced directly from the IANA Character Sets registry, which is the authoritative list of character set names maintained by the Internet Assigned Numbers Authority. The CSV export (character-sets-1.csv) was fetched and parsed to extract all 258 registered character sets; the data was re-verified against the registry as of October 2026 (registry last updated 2026-10-02). Each record includes the canonical name, the unique numeric MIBenum assigned by IANA (as defined in RFC 2978), the preferred MIME name where designated, and the complete list of aliases.
The mibEnum field is the standard numeric identifier used in SNMP MIB objects and protocol implementations to refer unambiguously to a character set. The preferredMime field is the name that should appear in Content-Type headers and charset parameters in MIME and HTTP — it is null for character sets that have no official MIME designation. The aliases array contains all alternative names registered for the encoding, covering historical names, ISO designations, IBM code page identifiers (e.g., IBM437), and IETF labels.
This dataset is useful for building HTTP header parsers, email clients, file format processors, encoding detection libraries, or any tool that must map between the many historical names for a character encoding and its canonical IANA identity. Note that WHATWG/HTML5 specifies a narrower set of encodings for the web platform — this dataset covers the full IANA registry, including legacy and rarely-used sets.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
character-encodings changelog for this dataset's history.
More Web datasets
- aria-attributes
- aria-roles
- csp-directives
- credit-card-types
- dns-record-types
- dom-events
- emoji
- emoji-shortcodes
- html-elements
- html-entities
- html-attributes
- input-types
- http-auth-schemes
- http-cache-directives
- http-content-codings
- http-headers
- http-methods
- http-status-codes
- http-versions
- iframe-sandbox-tokens
- ip-protocol-numbers
- keyboard-event-codes
- link-relations
- media-type-suffixes
- mime-types
- oauth-grant-types
- ports
- referrer-policies
- ip-special-blocks
- svg-elements
- tcp-flags
- tlds
- tls-cipher-suites
- tls-versions
- uri-schemes
- well-known-uris