Unicode Text Converter
See any text as Unicode code points, UTF-8 bytes, HTML entities and escape sequences.
Full output
U+0048 U+0065 U+006C U+006C U+006F U+0020 U+2014 U+0020 U+0031 U+0032 U+0033 U+0020 U+00B0 U+0043 U+0020 U+2713 |
Character by character
| Char | Code point | Decimal | UTF-8 | Bytes |
|---|---|---|---|---|
| H | U+0048 | 72 | 48 | 1 |
| e | U+0065 | 101 | 65 | 1 |
| l | U+006C | 108 | 6C | 1 |
| l | U+006C | 108 | 6C | 1 |
| o | U+006F | 111 | 6F | 1 |
| · | U+0020 | 32 | 20 | 1 |
| — | U+2014 | 8212 | E2 80 94 | 3 |
| · | U+0020 | 32 | 20 | 1 |
| 1 | U+0031 | 49 | 31 | 1 |
| 2 | U+0032 | 50 | 32 | 1 |
| 3 | U+0033 | 51 | 33 | 1 |
| · | U+0020 | 32 | 20 | 1 |
| ° | U+00B0 | 176 | C2 B0 | 2 |
| C | U+0043 | 67 | 43 | 1 |
| · | U+0020 | 32 | 20 | 1 |
| ✓ | U+2713 | 10003 | E2 9C 93 | 3 |
Characters, code points and bytes
Unicode assigns every character a code point — a number,
written U+0041 for "A". How that number is stored is a separate
question, decided by the encoding.
UTF-8 uses one byte for ASCII, two for most European accents and Greek, three for most of the rest including CJK, and four for emoji and historic scripts. So character count and byte count are different numbers, and the difference is exactly why database column limits and SMS lengths behave oddly with non-English text.
The escape forms
- HTML entities —
—for an em dash. Useful when a document's encoding is unreliable. - JavaScript escapes —
—. Characters above U+FFFF need a surrogate pair of two escapes, which is why an emoji often reports a length of 2 in JavaScript. - CSS escapes — a backslash, hex digits and a trailing space to terminate the sequence.
- Percent-encoding — each UTF-8 byte as
%XX, the form used in URLs.
Why text "looks fine but breaks"
Visually identical characters can be different code points: a real minus sign (U+2212) is not a hyphen (U+002D), and a curly apostrophe (U+2019) is not an ASCII one. Pasting from a word processor is the usual culprit. Inspecting the code points is the quickest way to find it.
Everything here runs on the server and nothing is stored.