HTML Entity Encode / Decode
Escape special characters into HTML entities, or decode entities back to plain text. Uses the he library for accurate entity handling — it knows all 2,000+ named HTML entities, not just the common ones like & and <. You can choose named references (&) or numeric ones (& or &), and optionally encode every character.

What it does
- ▸Encodes <, >, &, ", ' and any other characters into HTML entities
- ▸Decodes all named HTML entities (not just the common five)
- ▸Choice of named entities (&) or numeric (& / &)
- ▸Optional full encoding mode that encodes every character as an entity
- ▸Toggle between decimal and hex numeric references
- ▸Auto mode detects whether input is encoded and picks the right direction
Use cases
- ▸Escaping user-generated content before displaying it in HTML
- ▸Decoding entity-encoded text from a CMS or RSS feed
- ▸Preparing text for use inside an HTML attribute value
- ▸Debugging double-encoding issues where entities got encoded twice
How it works
Paste your text into the input pane
Choose Encode, Decode, or Auto mode
Toggle named vs numeric references and other options as needed
The result appears instantly in the output pane
Frequently asked questions
1What's the difference between named and numeric entities?
Named entities use readable names like & for & and © for ©. Numeric entities use the character's code point: & (decimal) or & (hex) for &. Named entities are more readable; numeric ones work for any character.
2When would I use 'Encode all characters'?
This encodes every character as a numeric entity, not just special characters. It's useful for obfuscating text (like email addresses to hide them from spambots) or when you need to ensure no character is interpreted as HTML.
3Does it handle all HTML5 named entities?
Yes. The tool uses the he library which supports all 2,000+ named entities defined in the HTML5 spec, including entities like —, …, ™, and all the mathematical and symbol entities.
Related tools
Use HTML Entity Encode/Decode offline in Devinity
All 95 tools run locally on your Mac. No internet required, no data sent to servers.
Download Devinity →


