Paste any text to get code points, decimal values, UTF-8 bytes, UTF-16 code units, HTML entities and u escapes at once
Hello🌏
\u0048\u0069
U+0048 U+0069
Hi
48 69
Raw characters, u escapes, U+ code points, decimal values, HTML entities, UTF-8 bytes and UTF-16 code units appear together, so you stop hopping between sites.
Encode and decode. Paste a u escape string, an HTML entity or a UTF-8 byte sequence and get readable text back, which is exactly what debugging mojibake needs.
The tool walks code points instead of bytes, so a character like 😀 is handled as one unit rather than being torn into two broken halves.
Every character gets its own row, showing how many bytes it costs and which Unicode block it belongs to. Locating a bloated string becomes trivial.
Plain text, u escapes, U+ code points, HTML entities, UTF-8 hex and decimal lists are all recognised on paste, and you can override the guess anytime.
Conversion happens in your browser. Nothing you type is sent to a server, so internal data is safe to inspect.
Text, emoji, u escapes, U+ code points, HTML entities and UTF-8 bytes all work. The chips below the box are quick samples.
The small chip under the box shows what was detected. If it guessed wrong, choose the correct format from the dropdown.
The top row counts code points, UTF-16 code units, UTF-8 bytes and blocks. Seven panels follow, then the per-character table.
Use the copy button on any panel. Clicking the code point cell of a table row copies just that character's U+ value.
When a page shows garbled text, compare code points against UTF-8 bytes to find which step encoded wrongly
How many Chinese characters or emoji fit in VARCHAR(20)? The UTF-8 byte count answers it
SMS, social posts and validators often count UTF-16 code units, where an emoji costs two
Copy a ready-made u escape when a special or invisible character must go into source code
HTML entities are safer than literal symbols inside templates and email markup
Watch real characters show the difference between code points, code units and bytes
A code point is a character's number in the Unicode character set, written U+XXXX. It is abstract and independent of storage. A code unit is the smallest unit a particular encoding scheme uses: UTF-16 uses 16-bit units, UTF-8 uses 8-bit units, which are bytes. A byte is the actual unit of storage and transfer. So one Chinese character has a single code point, occupies one UTF-16 code unit (two bytes) and three UTF-8 bytes. Mixing these three up is the usual reason length calculations go wrong.
UTF-8 is variable length and the byte count follows the code point: U+0000–U+007F use 1 byte, which is exactly ASCII, U+0080–U+07FF use 2 bytes, U+0800–U+FFFF use 3 bytes and U+10000–U+10FFFF use 4 bytes. Common CJK ideographs live around U+4E00–U+9FFF, which lands in the 3-byte band. Nearly all emoji are above U+1F300, past the 3-byte ceiling, so they need 4 bytes. This is also why UTF-8 is compact for English and more expensive for CJK text.
A UTF-16 code unit is 16 bits wide and can only reach U+FFFF. To represent anything higher, the standard reserves 0xD800–0xDFFF and combines two 16-bit code units into one code point: a high surrogate (0xD800–0xDBFF) plus a low surrogate (0xDC00–0xDFFF). The emoji 😀 (U+1F600) is written D83D DE00 in UTF-16. JavaScript string length counts code units, so '😀'.length returns 2 even though it is a single character. Use Array.from(str) or for...of to iterate real characters.
Composite emoji join several base emoji with the zero width joiner, U+200D. The family emoji 👨👩👧 is man U+1F468, ZWJ, woman U+1F469, ZWJ and girl U+1F467, which is 5 code points, 8 UTF-16 code units and 18 UTF-8 bytes, yet renders as one picture. Other emoji use the variation selector U+FE0F to force colour presentation, as in ❤️ which is U+2764 plus U+FE0F. One glyph therefore does not equal one character, which matters for counters and truncation.
All three rewrite non-ASCII characters as plain ASCII, but each belongs to a different parser. A u escape such as u4F60 is a programming language string literal, resolved by the compiler or interpreter in JavaScript, Java or C source. An HTML entity such as 你 or 你 is resolved by the browser when parsing HTML. A third option, percent encoding such as %E4%BD%A0, is resolved when a URL is parsed. Using the wrong layer is why an escape sometimes appears not to work.
UTF-8 maps U+0000–U+007F directly to the single bytes 0x00–0x7F, identical to ASCII. Multi-byte sequences never collide with that range either: the lead byte is 0xC0 or above and continuation bytes are fixed inside 0x80–0xBF. Any ASCII byte inside a UTF-8 stream is therefore a standalone ASCII character and cannot be absorbed into a neighbouring sequence. Old software reading the English parts of a UTF-8 file keeps working, which is a big reason UTF-8 became the default encoding of the web.
| Char | Code point | Decimal | UTF-8 bytes | UTF-16 units | HTML entity |
|---|---|---|---|---|---|
| A | U+0041 | 65 | 41 | 0041 | A |
| a | U+0061 | 97 | 61 | 0061 | a |
| 0 | U+0030 | 48 | 30 | 0030 | 0 |
| space | U+0020 | 32 | 20 | 0020 |   |
| © | U+00A9 | 169 | C2 A9 | 00A9 | © |
| € | U+20AC | 8364 | E2 82 AC | 20AC | € |
| 你 | U+4F60 | 20320 | E4 BD A0 | 4F60 | 你 |
| 好 | U+597D | 22909 | E5 A5 BD | 597D | 好 |
| 中 | U+4E2D | 20013 | E4 B8 AD | 4E2D | 中 |
| 文 | U+6587 | 25991 | E6 96 87 | 6587 | 文 |
| , | U+FF0C | 65292 | EF BC 8C | FF0C | , |
| 。 | U+3002 | 12290 | E3 80 82 | 3002 | 。 |
| ❤ | U+2764 | 10084 | E2 9D A4 | 2764 | ❤ |
| 😀 | U+1F600 | 128512 | F0 9F 98 80 | D83D DE00 | 😀 |