HTML Entity Encoder/Decoder
What are HTML entities?
HTML reserves five characters — &, <, >, " and ' — for markup. To show them as literal text you escape them as entities: &, <, >, " and '. Entities also come in numeric form (© or © for ©) and as hundreds of named references like , © and ….
Not to be confused with URL encoding: entities protect text inside HTML documents, percent-encoding protects text inside URLs. For query strings and links, use the [URL encoder](/url-encode) instead.
Features
- Encode — Escapes
&first (so nothing gets double-encoded), then< > " '. The apostrophe becomes', which works in every HTML version. - Optional non-ASCII encoding — Turn accented characters and emoji into
&#x…;numeric references, safe for ancient charsets and email templates. Astral characters are emitted as a single reference. - Decode — Handles named entities, decimal and hex numeric references, and applies the same browser rules: lone surrogates and out-of-range code points become U+FFFD, and C1 references like
€map through Windows-1252 (→ €). - Strict and honest — Decoding runs in a single pass (so
&lt;becomes<, not<), entities without a semicolon produce a clear error, and unknown entities are flagged instead of silently passing through.
How to use
1. Pick Encode or Decode
2. Paste your text — in encode mode, tick Also encode non-ASCII if you need ASCII-only output
3. Copy the result with one click
Privacy
All encoding and decoding happens locally in your browser. Nothing you paste is ever sent to a server.