HTML Entity Decoder
Turn common entity-encoded text back into normal readable characters.
HTML Entity Decoder
HTML Entity Decoder turns entities like &, < and ' back into the characters they represent, recovering readable plain text.
How to use it
- Paste text containing HTML entities.
- The decoded output appears immediately.
- Copy the plain text.
Named and numeric entities
Entities come in two forms. Named entities like & and are readable but only a fixed set exists. Numeric entities like ' and ' reference a Unicode code point directly in decimal or hexadecimal, and can represent any character.
Decoding runs the encoding order in reverse, so ampersands are decoded last. Decode them first and &lt; turns into < and then into a real less-than sign, which is one level of decoding too many and can reintroduce markup you did not intend.
Worked example
Why ampersands decode last:
- Encoded&lt;
- Decode ampersand first< then <, one level too far
- Decode ampersand last< stays as literal text
Result: Order matters in both directions, and getting it wrong can turn escaped text back into live markup.
When it helps
- Reading text extracted from HTML source or an API response.
- Cleaning content that has been double-encoded somewhere in a pipeline.
- Recovering plain text from a scraped page.
- Debugging why a page displays & instead of an ampersand.
Common mistakes
- Decoding untrusted content and then inserting it into a page, which can reintroduce active markup. Decode for display as text, not for injection into HTML.
- Decoding repeatedly until nothing changes. One pass is usually correct, and repeated passes can turn escaped content into live markup.