HTML Entity Decoder
Decode HTML entities (named and numeric) back to their original characters. Browser-native.
0 characters
52 characters
About HTML Entity Decoder
HTML entity decoding converts &, <, >, ", ', &#x...; and any other named or numeric HTML entity back to the corresponding character. Decoding uses the browser's built-in HTML parser via DOMParser, so the full set of named entities (thousands of them) is supported.
When to use it
- Reading scraped web content with HTML entities still in place
- Recovering original text from an over-escaped string
- Decoding numeric entities like € back to €
- Cleaning up RSS or XML output that includes HTML entities
How it works
The input is parsed as an HTML document. The body's textContent property yields the decoded string. This handles every entity the browser knows about (the full HTML5 named entity list plus &#NNN; and &#xHH; numeric forms).
Examples
<p>Hello & goodbye</p>
<p>Hello & goodbye</p>
Café co­st 100€
Café cost 100€
Frequently asked questions
- Which entities are supported?
- Every entity the browser's HTML parser knows: the full HTML5 named entity list plus numeric (&#NNN;) and hexadecimal (&#xHH;) forms.
- Is the decoded output safe?
- After decoding, the result is plain text. If you re-render it as HTML, re-escape with the html-entity-encode tool to stay safe.