Unicode Converter: Text to Code Points, UTF-8 and UTF-16, and Back
Type any text, emoji included, to see each character's Unicode code point, UTF-8 bytes, UTF-16 code units and HTML reference, or paste code points, decimal values, UTF-8 bytes or UTF-16 units to get the text back, with the exact byte that breaks invalid UTF-8.
Every character has a Unicode code point, written U+ and hex: รฉ is U+00E9 and โ is U+2615. UTF-8 stores a code point in 1 to 4 bytes, so รฉ becomes C3 A9 and โ becomes E2 98 95. UTF-16 uses one 16-bit unit up to U+FFFF and a surrogate pair above it, so ๐ (U+1F600) is D83D DE00.
This converter does its work in your browser on the text you type. It does not show character names or decide how a font draws a character, and it treats each code point separately, so emoji built from several code points appear as several rows.
6 code points, 9 UTF-8 bytes, 6 UTF-16 units
| Char | Code point | UTF-8 | UTF-16 | HTML |
|---|---|---|---|---|
| C | U+0043 | 43 | 0043 | C |
| a | U+0061 | 61 | 0061 | a |
| f | U+0066 | 66 | 0066 | f |
| รฉ | U+00E9 | C3 A9 | 00E9 | é |
| (space) | U+0020 | 20 | 0020 |   |
| โ | U+2615 | E2 98 95 | 2615 | ☕ |
UTF-8: 43 61 66 C3 A9 20 E2 98 95
Embed this calculator on your site โ
About the Unicode Converter
Unicode numbers its characters from U+0000 to U+10FFFF, and an encoding decides how those numbers become bytes. UTF-8, defined for the internet in RFC 3629, uses 1 byte for U+0000 to U+007F, which keeps plain ASCII text unchanged, 2 bytes up to U+07FF, 3 bytes up to U+FFFF and 4 bytes beyond. RFC 3629 also says there is only one valid way to encode each character and that U+D800 to U+DFFF must never be encoded. UTF-16, defined in RFC 2781, stores each code point below U+10000 as one 16-bit unit. For anything higher it subtracts 0x10000 and splits the remaining 20 bits across two units, a high surrogate from D800 to DBFF and a low one from DC00 to DFFF. That is why the grinning-face emoji (U+1F600) has a length of 2 in JavaScript or Java strings, which count UTF-16 code units. The converter reads your text one code point at a time and shows all of these forms in a table. Going back, it rejects overlong UTF-8, stray continuation bytes and unpaired surrogates, and names the byte or unit at fault.
Frequently asked questions
What is the difference between a code point and UTF-8?+
The code point is the character's number in Unicode, such as U+00E9 for รฉ. UTF-8 is one way of storing that number as bytes: U+00E9 becomes the two bytes C3 A9. The same character is 00E9 in UTF-16 and é as an HTML reference, but its code point never changes.
Why does an emoji take 4 bytes?+
Many emoji sit above U+FFFF, though some, such as โ (U+2615), do not, and RFC 3629 needs 4 bytes for anything from U+10000 up. ๐ is U+1F600, which is F0 9F 98 80 in UTF-8 and the surrogate pair D83D DE00 in UTF-16. Some emoji are several code points joined together, and the table shows each one on its own row.
Why is my UTF-8 rejected?+
The decoder follows RFC 3629 strictly. Common causes: a byte from 80 to BF with no lead byte before it, a sequence cut off at the end, bytes C0, C1 or F5 to FF, which never appear in UTF-8, an overlong form such as C0 80 for U+0000, or ED A0 80, which would encode the surrogate U+D800. The error names the byte where the bad sequence starts.
How do I write a character as an HTML entity?+
Use the numeric reference in the HTML column: &#x followed by the code point in hex and a semicolon, so โ is ☕. A decimal reference works too: ☕ is the same character, since hex 2615 equals 9,749 in decimal.
Embed this calculator
Free to use on your own site. Paste this snippet where you want the unicode converter to appear โ it resizes itself automatically.
<iframe
src="https://manytools.co/embed/unicode-converter"
title="Unicode Converter by ManyTools"
data-manytools="unicode-converter"
width="100%"
height="640"
loading="lazy"
style="border:0;width:100%;max-width:720px"></iframe>
<script>
(function () {
window.addEventListener("message", function (e) {
if (e.origin !== "https://manytools.co") return;
var d = e.data || {};
if (d.type !== "manytools:embed:height" || d.slug !== "unicode-converter") return;
var f = document.querySelector('iframe[data-manytools="unicode-converter"]');
if (f && d.height) f.style.height = d.height + "px";
});
})();
</script><a href="https://manytools.co/dev/unicode-converter">Unicode Converter by ManyTools</a>