Unicode converter
See exactly how any text is stored: each character's code point, its UTF-8 and UTF-16 bytes, and ready-to-paste escapes. Convert codes back to text and repair garbled characters.
| Char | Code point | Decimal | UTF-8 | UTF-16 | JS / JSON | HTML |
|---|---|---|---|---|---|---|
| A | U+0041 | 65 | 41 | 0041 | \u0041 | A |
| ñ | U+00F1 | 241 | C3 B1 | 00F1 | \u00f1 | ñ |
| € | U+20AC | 8364 | E2 82 AC | 20AC | \u20ac | € |
| 🙂 | U+1F642 | 128578 | F0 9F 99 82 | D83D DE42 | \ud83d\ude42 | 🙂 |
How mojibake happens
“é” is stored in UTF-8 as two bytes, C3 A9. A program that wrongly assumes Windows-1252 (one byte per character) shows those bytes as two characters: C3 is “Ô and A9 is “©”. That's how “Café” turns into “Café”. The fixer runs the mistake backwards.
Type something with accents or curly quotes and watch it break the same way:
Misread as Windows-1252: Café – naïve
Questions people ask
What is a Unicode code point?
A number that the Unicode Standard assigns to a character, written U+ followed by at least four hex digits. “A” is U+0041, “€” is U+20AC, “🙂” is U+1F642. Unicode 16.0 defines more than 150,000 characters.
What is the difference between Unicode and UTF-8?
Unicode is the numbering; UTF-8 and UTF-16 are ways of storing those numbers as bytes. UTF-8 uses 1–4 bytes per character and is backward-compatible with ASCII. UTF-16 uses one or two 16-bit units and is what JavaScript, Java and Windows use internally.
Why does “🙂”.length equal 2 in JavaScript?
JavaScript strings count UTF-16 code units. Characters above U+FFFF are stored as a surrogate pair (two units), so they count as 2. The table below shows the pair for each character.
How do I fix text like “Café”?
That is mojibake: UTF-8 bytes read as Windows-1252 or Latin-1. Paste it into the mojibake fixer on this page; it re-encodes the characters as bytes and decodes them as UTF-8, giving “Café”.
Can I convert U+ codes back to characters?
Yes. Paste codes such as U+00E9, \u00e9, \u{1F642}, é or 🙂 into “Code points → text”.