One character, many formats
The same character can be written in many ways, depending on where it is used. This is the euro sign:
| Format | Euro sign € | Emoji 😀 | Used in |
|---|---|---|---|
| Character | € | 😀 | Any UTF-8 text |
| Named entity | € | no name | HTML |
| Decimal entity | € | 😀 | HTML, XML |
| Hex entity | € | 😀 | HTML, XML |
| JavaScript escape | \u20AC | \uD83D\uDE00 | JavaScript and JSON strings |
| Code point | U+20AC | U+1F600 | Unicode documentation |
| CSS escape | \20AC | \1F600 | CSS content and selectors |
| URL encoding | %E2%82%AC | %F0%9F%98%80 | URLs and query strings |
How the converter works
It finds every entity in your text, named, decimal or hex, and replaces it with the format you choose. Text that is not an entity stays as it is, unless you also tick the option to convert plain non-ASCII characters. That option is the quick way to turn a whole string into JavaScript escapes or URL encoding.
The entity table
Below the result, a table lists each distinct entity from your text: the character, its Unicode code point (or two code points, for the few entities that stand for a pair), a short meaning, and how often it appears. Use it to find out what an unfamiliar entity is.
Details worth knowing
- Characters above U+FFFF, such as emoji, need two units in a JavaScript escape, called a surrogate pair. The converter writes both.
- CSS escapes get a trailing space when the next character could be read as part of the code.
- Named output is used only for characters that have a name in the HTML list. Others fall back to the decimal form.
- Windows-1252 codes such as
–are read the way browsers read them, as an en dash.
For a plain text result, use HTML decode. To write entities, use HTML encode. For bytes and numbers, see the hex to binary converter and the binary to decimal converter. Browse names in the HTML entities list, and learn the rules in the HTML entities guide.