How to use it
- Choose Encode to write characters as references, or Decode to read them.
- For encoding, choose What to encode. The five special characters are always written as references in every choice.
- Paste the text into Text. The Result appears as you type.
- Copy the Result and paste it into your HTML, or into the field that needs it.
Named and numeric references
A character reference writes a character as text that HTML reads back as that character. A named reference uses a name between an ampersand and a semicolon, such as © for the copyright sign. A numeric reference uses a number, decimal as © or hexadecimal as ©. The list is the one the WHATWG maintains for HTML; it has 2,231 entries, with and without the semicolon, and this page decodes every one of them.
Some names are legacy names that HTML also reads without the semicolon in text, such as & or ©. Encoding always writes the semicolon. Decoding follows the same rule as a browser: when several names start the same text, the longest one wins.
é = é = é = é
Why only five characters must be escaped, and what the numbers mean
In HTML text and attribute values, the characters & < > " and ' can change the markup. Writing them as & < > " and ' keeps them as plain text. Other characters need a reference only when the page's character encoding cannot hold them, which is why the Named and Numeric choices exist.
Numbers from 0x80 to 0x9F are read as windows-1252 characters, so – gives an en dash. The number 0, a surrogate half and any number above 1,114,111 are not characters, and they decode to the replacement character U+FFFD.
- Encode with Special characters only when the page is UTF-8 and only markup could break.
- Use the numeric choice when a system accepts only ASCII, such as some e-mail templates.
Worked example: the default text
The default text is Crème brûlée costs 5 € & "quoted", with the word tea in bold HTML tags and an emoji at the end. Encoded with the named choice, the è becomes è, the û becomes û, the é becomes é, the euro sign becomes €, and the emoji becomes 😀. The ampersand, the quotes and the angle brackets are written as &, ", < and >.
That is 12 replacements: the 5 non-ASCII characters and the 7 special characters. Decoding the result gives back the original text.
Frequently asked questions
What is the difference between a named and a numeric reference?
A named reference uses a name such as é, which is easy to read. A numeric reference uses the character's code, such as é, and works for every character, including those with no name, such as most emoji.
Does the decoder handle every entity in HTML?
It handles every named reference in the WHATWG list, with and without the semicolon, and every numeric reference. Text that looks like a reference but is not one, such as &unknown;, is left unchanged.
Why does © 2026 decode to a copyright sign?
HTML reads a few legacy names without the semicolon in text. The browser does the same, so the decoder does too. Write the semicolon to avoid any doubt.
Why did – become a dash?
Numbers from 128 to 159 are read as windows-1252 characters, as HTML requires. The number 150 is an en dash in that table.
Is my text sent to a server?
No. Encoding and decoding run in your browser. Nothing you type is sent to our server or stored there.
Sources
- WHATWG: HTML named character references (the list of names)
- WHATWG: HTML parsing, numeric character reference end state
Figures and text last checked on Tuesday, November 10, 2026.