SEO & Website Tools
HTML Entity Encoder & Decoder
Convert characters like &, <, > and quotes into HTML entities, or turn &, © and 😀 back into readable text. Choose named, decimal or hex entities, and see any invalid or unknown entities flagged.
Runs in your browser
Features
What you get
Encode and decode
Switch direction anytime, or feed the output straight back in.
Named, decimal or hex
©, © or © — your choice, with numeric fallbacks for characters without a name.
Flexible scope
Encode just & < > and quotes, or every non-ASCII character too.
No double encoding
Optionally keep existing valid entities so & doesn't become &amp;.
Spec-correct decoding
All 2,231 named entities, numeric references, emoji and the HTML spec's edge cases.
Problems flagged
Unknown names, missing semicolons and invalid code points are listed with explanations.
How to use
How to use the HTML Entity Encoder & Decoder
Encoding walks through your text one Unicode character at a time, so an emoji becomes one reference (😀) rather than two broken halves. Special characters always encode; you can also encode every non-ASCII character as a named entity where one exists, or as decimal or hex. Decoding uses the HTML standard's rules — including legacy names without a semicolon and the replacement character for invalid code points — and lists anything unusual. Decoded results are only ever shown as plain text, never rendered.
- 01
Choose a direction
Encode text into entities, or decode entities into text.
- 02
Paste your content
The result updates as you type. Adjust the encoding options if needed.
- 03
Copy or download
Copy the result or download it as a .txt file.
Examples
Worked examples
Basic encoding
Tom & Jerry < Special Characters > → Tom & Jerry < Special Characters >
Non-ASCII as named entities
café © 2026 → café © 2026 (or café © 2026 as decimal).
Decoding with problems
© 2026 decodes to © 2026 but is flagged for its missing semicolon; &zzz; is unknown and left as it is.
Technical specifications
- Named entities
- All 2,231 from the HTML standard
- Numeric
- Decimal &#…; and hex &#x…;
- Unicode
- Full range incl. emoji (one reference each)
- Apostrophe
- ' (works in HTML4 and HTML5)
- Max text
- 5 million characters
- Output
- Plain text — never rendered
Privacy
Text is converted in your browser and never sent or stored.
Read the full privacy policy.
FAQ
HTML Entity Encoder & Decoder questions
HTML entities are codes such as & or © that stand for characters which would otherwise be read as HTML, or are hard to type. ZSpace Tools' HTML Entity Encoder & Decoder encodes text into entities and decodes all 2,231 named HTML entities plus decimal and hexadecimal references, following the HTML specification.
Encoding walks through your text one Unicode character at a time, so an emoji becomes one reference (😀) rather than two broken halves. Special characters always encode; you can also encode every non-ASCII character as a named entity where one exists, or as decimal or hex. Decoding uses the HTML standard's rules — including legacy names without a semicolon and the replacement character for invalid code points — and lists anything unusual. Decoded results are only ever shown as plain text, never rendered.
In text, & and < must be encoded (> is encoded for safety). Inside attribute values, the quote character you use (" or ') must be encoded too.
Both work in modern browsers. Named entities like © are easier to read; numeric ones work for every character, including those without a name, such as ₹ (₹).
' was only added in HTML5 and isn't recognised by some older HTML parsers. ' works everywhere.
It helps when placing text inside HTML content, but it isn't a complete defence. Safe output depends on the context (attributes, URLs, scripts, CSS). Use your framework's context-aware escaping and a sanitiser for untrusted HTML.
They're left as written and listed below the output — for example &zzz; or a numeric reference to an invalid code point, which browsers show as �.
No. Everything runs in your browser.
Related tools
HTML Formatter & Minifier
Beautify messy HTML with clean indentation, or minify it for production.
URL Encoder & Decoder
Percent-encode or decode URLs and query parameters, including Unicode and emoji.
Base64 Encoder & Decoder
Encode text or files to Base64 and decode it back, with full Unicode support.