HTML Entities
All 2,125 semicolon-terminated named character references in the HTML standard — the &name; entities you use to write characters that are otherwise awkward or impossible to type directly, from & and © to the full set of mathematical and typographic symbols. Each entry gives the bare name, the complete entity string, the Unicode codepoints it expands to, and the rendered character.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/html-entities.json
Or use as a typed import:
import { htmlEntities } from "https://staticdata.dev/v1/html-entities.ts"
Formats
- JSON 248.5 KB
/v1/html-entities.json
min: 160.7 KB · /v1/html-entities.min.json
- CSV 57.0 KB
/v1/html-entities.csv
- TypeScript 248.7 KB
/v1/html-entities.ts
export const htmlEntities
type HtmlEntity = (typeof htmlEntities)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| name | string | Entity name without the leading & or trailing ; | copy |
| entity | string | The full entity reference | © |
| codepoints | number[] | Unicode codepoints the entity expands to | [169] |
| character | string | The rendered character(s) | © |
Preview
First 10 records.
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/html-entities.json | jq '.[0]' import type { HtmlEntity } from "https://staticdata.dev/v1/html-entities.ts";
const res = await fetch("https://staticdata.dev/v1/html-entities.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const htmlEntities: HtmlEntity[] = await res.json();
console.log(htmlEntities[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/html-entities.min.json") as r:
htmlEntities = json.load(r)
print(htmlEntities[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/html-entities.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/html-entities.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
The data is generated directly from the WHATWG HTML standard’s machine-readable entities.json, the normative source for named character references in HTML. Because the records are a direct transformation of that file, they carry the HTML Standard’s license, CC BY 4.0: attribute “HTML Standard, WHATWG (https://html.spec.whatwg.org/)” when redistributing.
HTML’s table lists each reference twice — once with the trailing semicolon (©) and, for a legacy subset, once without (©). This dataset keeps only the canonical, semicolon-terminated form, since that is the form you should always write; the semicolon-less variants exist solely for backwards compatibility with old documents and should not be relied on. Entries are sorted by name.
A few references expand to more than one codepoint — for example ≂̸ produces a base character plus a combining mark — which is why codepoints is always an array. The character field is the actual rendered string, so you can use it directly without decoding the codepoints yourself.
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
html-entities changelog for this dataset's history.
Related datasets
More Web datasets
- aria-attributes
- aria-roles
- character-encodings
- csp-directives
- credit-card-types
- dns-record-types
- dom-events
- emoji
- emoji-shortcodes
- html-elements
- html-attributes
- input-types
- http-auth-schemes
- http-cache-directives
- http-content-codings
- http-methods
- http-status-codes
- http-versions
- iframe-sandbox-tokens
- ip-protocol-numbers
- keyboard-event-codes
- link-relations
- media-type-suffixes
- oauth-grant-types
- ports
- referrer-policies
- ip-special-blocks
- svg-elements
- tcp-flags
- tlds
- tls-cipher-suites
- tls-versions
- uri-schemes
- well-known-uris