Unicode Converter

In short: type any text and see every character as a Unicode code point (U+20AC), its UTF-8 bytes (e2 82 ac), its UTF-16 units and its HTML entity — including emoji, which are handled as single characters, not broken surrogate halves. Or run it backwards: paste a list of code points and get the text back.

Code points are not bytes

Unicode gives every character a number, called a code point, written U+ followed by hex: A is U+0041, the euro sign is U+20AC, the grinning face is U+1F600. That number is an identity, not a storage format. To store or transmit it, an encoding turns it into bytes: UTF-8 uses one byte for ASCII and up to four for the rest (€ becomes e2 82 ac; the emoji becomes f0 9f 98 80); UTF-16 uses one 16-bit unit for characters up to U+FFFF and a surrogate pair beyond it (the emoji is d83d de00 — two units for one character). Most "mystery character" bugs are a confusion between these layers: a length counted in UTF-16 units when it should be characters, bytes read as the wrong encoding, a string cut in the middle of a surrogate pair. This page shows all the layers side by side so the confusion has nowhere to hide.

The table the converter prints gives, for each character: the character itself, its code point, its UTF-8 bytes in hex, its UTF-16 code units in hex, and its HTML numeric entity in decimal and hex. Characters above U+FFFF — emoji, many historic scripts, musical symbols — are the interesting rows: one character, two UTF-16 units, four UTF-8 bytes. If your software reports that string as longer than the character count, it is counting UTF-16 units (as JavaScript's .length does) — the classic cause of "this emoji counts as 2" bugs in character counters and validation limits.

Converting back, and the formats accepted

The reverse direction takes code points in the forms developers actually meet them: U+20AC notation, hex entities like €, decimal entities like €, or bare hex values separated by spaces. Press "Convert codes back to text" with any mixture in the box and the characters come back. This is the tool for the everyday archaeology of the web: a string in a log file full of &#x…; escapes, a JSON payload with \uXXXX sequences you want to read (paste the hex after the \u as a bare value), or an entity-encoded snippet from an old HTML file. What it does not do is named entities (€, &) — those belong to HTML, and the HTML formatter and entity tools in this hub are the neighbours for that job; numeric forms cover everything, since every character has a number.

One caution that saves real pain: normalisation. The same visible text can be different code points — "é" is either the single character U+00E9 or the pair U+0065 U+0301 (e plus combining accent), and this converter will show you the difference when a comparison, a search or a deduplication mysteriously fails. If two strings look identical but do not match, paste both here: the table never lies about what is actually in them.

A worked example

The sample text "Café € 😀" converts to eight characters: C (U+0043), a (U+0061), f (U+0066), é (U+00E9, UTF-8 c3 a9), a space, € (U+20AC, UTF-8 e2 82 ac), another space, and 😀 (U+1F600, UTF-8 f0 9f 98 80, UTF-16 d83d de00). Eight characters; nine UTF-16 units; fourteen UTF-8 bytes. Three different "lengths" for one short string, each correct in its own layer — and the source of a thousand off-by-several bugs, all visible in one table.

Frequently asked questions

What is a Unicode code point?

The permanent number Unicode assigns to a character, written U+ plus hexadecimal: U+0041 is A, U+00E9 is e-acute, U+20AC is the euro sign, U+1F600 is the grinning face emoji. Code points run from U+0000 to U+10FFFF. A code point is an identity, not bytes — the same character becomes different byte sequences under UTF-8, UTF-16 and UTF-32, which this page shows side by side for every character you enter.

Why does an emoji count as 2 characters in my code?

Because it is one character but two UTF-16 code units. Characters above U+FFFF — most emoji included — are stored in UTF-16 as a surrogate pair: the grinning face is d83d de00. Languages and APIs that count UTF-16 units (JavaScript's string length is the famous case) report 2. This converter iterates by true characters, so its count is the human one; when your limit checks disagree with it, they are counting units or bytes, and now you know which.

What is the difference between UTF-8 and UTF-16?

Both encode all of Unicode; they differ in shape. UTF-8 uses 1 byte for ASCII, 2 for most European and Middle Eastern scripts, 3 for most Asian characters, 4 for emoji and rare characters — it is the encoding of the web and most files. UTF-16 uses 2 bytes for the common characters and 4 (a surrogate pair) beyond U+FFFF — common inside Windows and Java/JavaScript string handling. The euro sign is 3 bytes in UTF-8 (e2 82 ac) and 2 in UTF-16 (20ac); the emoji is 4 in both, arranged differently.

How do I convert code points back to text?

Put the codes in the box — U+20AC format, € hex entities, € decimal entities, or bare hex values separated by spaces — and press "Convert codes back to text". Mixed formats in one paste are fine. This is the quick way to read escaped strings from logs, JSON \uXXXX sequences (paste the hex digits) and entity-encoded HTML snippets.

Why do two identical-looking characters show different codes?

Because Unicode contains look-alikes and composed forms. The classic case: é as one character (U+00E9) versus e + a combining accent (U+0065, U+0301) — identical on screen, different in the data, and they will not match in searches or comparisons until normalised (usually to NFC). Cyrillic а and Latin a are another famous pair. When text misbehaves, paste it here and read the codes: the table shows what is really there.

Related tools

Encodings verified on 24 November 2026 against the Unicode standard examples. Everything runs in your browser — nothing you type is sent anywhere.