HTML Entity Decode — Decode HTML Entities to Plain Text
Decode HTML entities like &, <, A, and A to their original characters. Runs entirely in your browser. No uploads, no limits.
HTML entities exist for three reasons: characters that have special meaning in HTML markup (the ampersand and the angle brackets), characters that are not on a standard keyboard (copyright, em-dash, smart quotes), and characters that are easy to confuse visually (non-breaking space, zero-width joiner). When HTML is served by a browser, the entities decode automatically — the user never sees ©, they see the copyright symbol. When HTML is processed by tools that do not understand entities (a CSV import, a database column with a VARCHAR constraint, a search index), the entities show up as raw text and the document becomes unreadable. Decoding the entities back to characters is the fix.
The non-obvious thing about entity decoding is the named-vs-numeric distinction. Named entities (&, <, ©) are a closed list maintained by the W3C — about 2,000 entries in HTML5, covering the common cases and a long tail of legacy entities from the Latin-1 era. Numeric entities (A, A) are universal — every Unicode code point has a numeric entity, including characters added in Unicode 15.0 and later. The HTML5 spec actually requires browsers to recognize named entities only in certain contexts; numeric entities are recognized everywhere. For decoding, the tool accepts both forms and applies them uniformly.
For a final hand-off: if the input is HTML content (a CMS export, an email body, a scraped page), running it through the decoder is the right first step before any further processing. If the destination is a database or a search index, decoding is usually required — most databases store characters as-is, and most search engines tokenize the decoded form. If the destination is another HTML page, no decoding is needed — the browser will decode on render.
How to use
Paste the entity-encoded text
Drop the text into the input area. Both named entities (&, <, ©) and numeric entities (A, A) are decoded in the same pass.
Watch the decoded output
The output updates as you type. Numeric entities can be either decimal (A) or hexadecimal (A); the parser auto-detects the format based on the `x` prefix after `#`.
Copy the decoded result
Copy the plain-text result to your clipboard, or download it as a .txt file. The decoder leaves non-entity characters untouched so the output is the exact source minus the entity syntax.
Frequently asked
What is the difference between named and numeric entities?
Named entities use a mnemonic abbreviation (`&` for ampersand, `<` for less-than, `©` for copyright). Numeric entities use a code point — decimal (`A` for A) or hexadecimal (`A` for A). HTML 5 defines 2,000+ named entities; numeric entities cover every Unicode code point.
Why are there two decimal and hex forms for the same character?
Numeric entities can use either decimal (base 10, A) or hexadecimal (base 16, A). Both decode to the same character. Decimal is the original form from HTML 2.0; hex was added later and is more compact for high code points like emoji (😀 vs 😀).
Does the decoder handle HTML5 named entities?
Yes — the parser follows the HTML5 named character references list, which covers 2,125 named entities including legacy ones like `Ä` and modern ones like ` `. The full W3C list is encoded in the underlying `he` library.
What happens with malformed entities?
Malformed entities (missing semicolon, unknown name, broken numeric value) are passed through as literal text. The tool does not silently drop them — the output keeps `¬anentity;` as `¬anentity;` so you can spot the bad input rather than silently corrupting it.
Will it decode double-encoded text?
No — the decoder runs one pass. Double-encoded text like `&amp;` decodes to `&` (one level), not to `&` (two levels). Run the output through the decoder again if you need to peel off multiple layers of encoding.
Limitations
- Single passThe decoder runs one pass over the input. Double-encoded or triple-encoded text is partially decoded — `&amp;` becomes `&`, not `&`. Feed the output back through the tool if you need to peel off multiple layers.
- Unknown entities are not droppedMalformed or unknown entities pass through as literal text. This is the safe behavior — silently dropping them would hide errors. Inspect the output for stray `&` characters if you suspect bad input.
- No attribute decodingHTML attribute decoding (e.g., handling `'` in single-quoted attributes) follows slightly different rules than content decoding. The tool uses the content rules; if you need attribute-mode decoding, post-process with a stricter parser.
Platform notes
- macOS
- TextEdit does not decode entities on paste. The browser tool is the right pick for HTML pasted from a CMS, an email, or a documentation page that needs to land as plain text without stray `&` artifacts.
- Windows
- Notepad and Notepad++ do not auto-decode entities. The browser tool is the right pick for HTML fragments copied from an email, a chat, or a content management system that need to land as readable plain text.
- Linux
- For command-line work, `sed 's/&#\([0-9]\+\);/\1/g'` handles decimal entities. The browser tool is the right pick for mixed named and numeric entities from a CMS, an RSS feed, or an API response that `sed` would mangle.
- Web
- Runs entirely client-side. Works offline once the page has loaded. Useful for decoding HTML snippets in restricted environments where command-line tools are not available.