How to use the unicode code point converter
- Choose Text to code points, Code points to text or UTF-8 bytes to text.
- Type or paste your input. Code points can be written as U+1F600, 0x1F600, \u{1F600}, \uD83D\uDE00, 😀 or plain hex.
- Read the table: each character with its code point, decimal value, UTF-8 bytes and UTF-16 units.
- Copy the table or the resulting text.
A, an accented letter, the euro sign and an emoji
The letter A is U+0041. In UTF-8 it is the single byte 41 and in UTF-16 it is the unit 0041. The letter e with an acute accent is U+00E9, which is C3 A9 in UTF-8 and 00E9 in UTF-16.
The euro sign is U+20AC, E2 82 AC in UTF-8 and 20AC in UTF-16. The grinning face emoji is U+1F600, which needs four bytes in UTF-8 (F0 9F 98 80) and two units in UTF-16 (D83D DE00), a surrogate pair.
Code points, bytes and units
A code point is the number Unicode assigns to a character, written U+ followed by 4 to 6 hex digits, from U+0000 to U+10FFFF. An encoding says how that number is stored. UTF-8 uses 1 byte for U+0000 to U+007F, 2 bytes up to U+07FF, 3 bytes up to U+FFFF and 4 bytes above. UTF-16 uses one 16 bit unit up to U+FFFF and a pair of units, called a surrogate pair, above it.
The values D800 to DFFF are reserved to build surrogate pairs. They are not characters, so they cannot be used as input here. If text already contains a lone surrogate, the table marks it and shows its UTF-8 bytes as invalid, because UTF-8 cannot store it.
Characters that look like one
What a reader sees as one symbol can be several code points. An accented letter may be a base letter plus a combining mark, and some emoji are joined with a zero width joiner (U+200D). The summary line counts code points and, where your browser supports it, visible characters, so you can see the difference. Names of characters are not looked up.
The table shows up to 500 rows for speed, while the totals cover the whole text, which can be up to 100,000 characters. The tool works in your browser and nothing is uploaded. Related tools are the ASCII table, the hex viewer and the number base converter.
Assumptions and limits
- UTF-8 and UTF-16 are shown as defined by the Unicode standard, with UTF-16 units in big endian reading order.
- Surrogate code points D800 to DFFF are refused as input and flagged in text.
- UTF-8 bytes entered as hex must form valid UTF-8 or an error is shown.
- The visible character count uses the browser's own text segmentation and may differ between browsers.
Frequently asked questions
What is the Unicode code point of the letter A?
U+0041, which is 65 in decimal. In UTF-8 it is the byte 41 and in UTF-16 it is the unit 0041.
Why do emoji need two UTF-16 units?
UTF-16 units hold 16 bits, which reaches U+FFFF. Code points above that, such as U+1F600, are split into a high and a low surrogate, here D83D and DE00.
How do I get the UTF-8 bytes of a character?
Paste the character into the text box. The UTF-8 column shows its bytes in hex, one to four of them.
Why was a code point rejected?
Code points must be at most U+10FFFF and may not be surrogates (D800 to DFFF). The message names the value that failed.