HTML Entity Encode & Decode
Escape HTML special characters or decode entities back to text.
Result appears here.
Encode text so it displays literally inside HTML (turning < into < and so on), or decode a string full of entities back into readable text. Handles named and numeric entities, entirely in your browser.
How to use the HTML Entity Encoder / Decoder
- Paste your text or entity-encoded HTML.
- Click Encode to escape special characters, or Decode to convert entities back.
- Copy the result.
Frequently asked questions
Which characters need escaping in HTML?
The five with special meaning: & (&), < (<), > (>), double quote (") and single quote ('). Escaping them prevents text from being parsed as markup β the basis of XSS prevention.
Does decoding handle numeric entities like €?
Yes β both named entities (€) and numeric forms (decimal € or hex €) decode correctly.