HTML Entities Encoder / Decoder
Escape text to HTML entities, or unescape entities back to readable text. Named, decimal and hex forms all handled.
How to use
- Paste text on the left. Encode escapes & < > " ' — the essentials for safe HTML.
- Enable Encode all non-ASCII to also convert accented letters, CJK and emoji to numeric references (email-template friendly).
- Decode converts entities back — including & < — 😀 and any other named or numeric form.
Frequently asked questions
What are HTML entities and when do I need them?
HTML entities let you display characters that would otherwise be interpreted as markup: < becomes <, & becomes &. You need them whenever user-supplied text is placed inside HTML — both to render correctly and to prevent XSS.
What is the difference between named, decimal and hex entities?
All three refer to the same character: & (named), & (decimal) and & (hexadecimal). Named entities are most readable, numeric references cover every Unicode code point with no name needed. Browsers treat them identically.
Which characters should I always escape?
At minimum the big five: & < > " and '. Escaping & and < is essential for valid HTML; the quotes matter inside attribute values. This tool's smart mode escapes exactly those and leaves the rest human-readable.