What HTML entities are
An HTML entity is a piece of text that stands for a single character, such as & for & or é for é. Websites, databases and APIs often store text in this form, so when you copy it you see the codes and not the characters. The decoder converts them back.
What it decodes
- Named entities:
©,é,…and the rest of the more than 2,000 names that HTML defines. The names are read by your browser, so the list is always complete. - Decimal entities:
€is €. - Hex entities:
€is also €.
| Character | Entity | Decimal | Hex | Meaning |
|---|---|---|---|---|
| & | & | & | & | ampersand |
| < | < | < | < | less-than sign |
| > | > | > | > | greater-than sign |
| " | " | " | " | double quotation mark |
| ' | ' | ' | ' | apostrophe (single quote), HTML5 and XML |
| (invisible) | |   |   | non-breaking space |
| © | © | © | © | copyright sign |
| ® | ® | ® | ® | registered sign |
| ™ | ™ | ™ | ™ | trade mark sign |
| € | € | € | € | euro sign |
| … | … | … | … | horizontal ellipsis |
| — | — | — | — | em dash |
Double-encoded text
If you see &lt; or &amp;, the text was encoded twice: < became &lt;. A single decode gives you < back. Tick Decode repeatedly to keep going until nothing changes, and the tool tells you how many rounds it needed. Leave it off when the text is meant to show an entity, for example in a tutorial about HTML.
Options
- What to decode: everything, only numeric entities, or only the five basic ones (& < > " and the apostrophe).
- Only with a semicolon: browsers also accept a few entities without the closing semicolon, such as
© 2024. Tick this to decode only complete entities. - Normal spaces for non-breaking spaces: replaces
results with an ordinary space, which is useful when you paste into a spreadsheet or a database.
Things the tool tells you
- An entity that does not exist, such as
&unknown;, is left as it is and listed as unknown. - Numeric codes from 128 to 159, such as
–, are read as Windows-1252 characters, as browsers do. That gives an en dash. - A code that is not valid Unicode, such as 0 or a number above 1,114,111, becomes the replacement character �.
Safe by design
The result is shown as plain text. It is never put into a page as HTML, so decoding an entity like <script> cannot run anything. Everything happens in your browser and nothing is uploaded.
To go the other way, use HTML encode. To convert entities into decimal, hex or JavaScript escapes, use the entity decoder and converter. Look up any entity in the HTML entities list, and read the HTML entities guide for how they work.