Inspect exactly how text becomes UTF-8 bytes – as hex, percent-escapes, decimal or hex escapes – and convert those bytes back to text.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
The encoding the web settled on
UTF-8 represents every Unicode character in one to four bytes, with ASCII occupying exactly one byte and the same values it always had. That backward compatibility is why it won: an ASCII file is already a valid UTF-8 file.
Worked example
"A" U+0041 → 41 1 byte "é" U+00E9 → c3 a9 2 bytes "€" U+20AC → e2 82 ac 3 bytes "😀" U+1F600 → f0 9f 98 80 4 bytes
How the length is signalled
The first byte says how many follow: a leading 0 means one byte, 110 means two, 1110 means three, 11110 means four, and every continuation byte begins 10. That structure is self-synchronising — from any point in a stream you can find the next character boundary, which is why a corrupted byte damages one character rather than everything after it.
Why byte length matters
Database columns, API limits and file formats usually count bytes, not characters. A 100-character field holds 100 ASCII characters or 25 emoji, which is a real source of truncation bugs in systems that assumed the two were the same.
Limits
The tool converts between text and UTF-8 bytes and reports invalid sequences rather than substituting replacement characters. Everything runs in your browser.
How to use the UTF-8 Encoder and Decoder
- Paste text to encode, or UTF-8 bytes to decode.
- Set the direction and the byte format – hex, percent-escapes, decimal or hex escapes.
- Click "Convert" to see exactly which bytes represent your text.
Frequently asked questions
What makes UTF-8 the dominant encoding?
It is backwards compatible with ASCII – every ASCII file is already valid UTF-8 – while still covering all of Unicode using one to four bytes per character. It also has no byte-order ambiguity, unlike UTF-16.
How do I know how many bytes a character will take?
ASCII characters take one byte; most Latin, Greek, Cyrillic, Hebrew and Arabic letters take two; most CJK characters and common symbols take three; emoji and rarer scripts take four. The UTF-8 Byte Counter breaks any text down by these categories.
Why does the percent format look like URL encoding?
Because it is the same thing. Percent-encoding of non-ASCII characters is defined as percent-escaping their UTF-8 bytes, so this view shows exactly what a URL encoder produces.
Work out why text has turned to gibberish
An explanation of which encoding a string is really in, and what its characters actually are.
- Character Encoding DetectorGet a read on what encoding the bytes are likely to be.
- UTF-8 Encoder and Decoder you are hereDecode the bytes as UTF-8 and see whether the text comes back.
- Unicode Code Point ConverterIdentify the exact code points behind the characters you are seeing.