ToolLineup

UTF-8 Converter & Inspector

This UTF-8 converter and inspector breaks text down character by character, showing the Unicode code point, the UTF-8 bytes it becomes, the UTF-16 units JavaScript actually holds in memory, and which block of Unicode it belongs to. It converts in both directions as well. This is the tool to reach for when text arrives mangled: seeing that é has become é tells you immediately that UTF-8 bytes were read as Latin-1, and seeing that a single emoji occupies two UTF-16 units explains why a length check reported 2 for what looks like one character. Both are diagnoses no amount of guessing at the string level would produce.

How it works

Shows exactly how text is stored as UTF-8, character by character: the code point, the bytes it becomes, and the UTF-16 units JavaScript actually holds in memory. Converting in either direction works too.

This is the tool to reach for when text arrives mangled. Seeing that é has become é tells you immediately that UTF-8 bytes were read as Latin-1, which no amount of guessing at the string level would reveal.

Everything runs in your browser — nothing you paste is sent to a server.

Input
Paste text to inspect…
Result

Diagnosing mangled text

Encoding bugs all look the same from the outside — the text is wrong — but the inspector usually identifies the cause in seconds:

You seeWhat happened
é instead of éUTF-8 bytes read as Latin-1
’ instead of an apostropheUTF-8 bytes read as Windows-1252
? or □ boxesCharacters the font cannot draw, or a lossy conversion
An invisible BOM at the startA UTF-8 file written with a byte order mark
A "surrogate" rowA broken emoji or a string cut in the middle of a character

Why string length lies

JavaScript strings are UTF-16. Characters below U+10000 take one unit; everything above — most emoji, historic scripts, some CJK extensions — takes two. That is why "🌍".length is 2, and why slicing a string can cut an emoji in half. The UTF-16 column shows exactly where that will happen.

Frequently asked questions

What does the inspector show?

For each character: its Unicode code point, its UTF-8 bytes, the UTF-16 units it occupies in memory, and which block of Unicode it comes from.

My text shows é instead of é — what happened?

UTF-8 bytes were read as Latin-1. The two bytes C3 A9 that make up é were each interpreted as a separate character. The inspector shows this immediately.

Why does one emoji count as two characters?

Most emoji sit outside the Basic Multilingual Plane and need two UTF-16 units, which is what JavaScript string length counts. The inspector shows both units so the discrepancy makes sense.

What is the difference between a code point and a byte?

A code point is the number Unicode assigns to a character. Bytes are how that number is stored — UTF-8 uses one to four bytes depending on the value.

Can I convert bytes back to text?

Yes. Switch the direction and paste the bytes in hex, decimal, octal or binary.

Is my text uploaded?

No. Inspection and conversion happen entirely in your browser.

Related tools