UTF-8 Byte Viewer
Paste text to see how many bytes each character takes and what those bytes are, in UTF-8 or, if you prefer, UTF-16 and UTF-32.
Processed locally in your browser/ Your data stays in your browser.
What is UTF-8 Byte Viewer?
UTF-8 stores each Unicode code point in one to four bytes: ASCII takes one, accented Latin, Greek, Cyrillic, Hebrew and Arabic letters take two, most of the rest of the Basic Multilingual Plane (including € and CJK) takes three, and emoji take four. The first byte tells how long the sequence is; the following bytes always start with the bits 10.
This viewer lists one row per code point or per visible character with its byte count, hex, binary and decimal bytes and the UTF-8 bit pattern it fills. A summary gives total bytes, average bytes per character, whether the text is ASCII-only and its size in UTF-8, UTF-16 and UTF-32. You can switch to UTF-16 or UTF-32 in either byte order and prepend a BOM.
How does it work?
- Type or paste your text. The table and the byte stream update as you type.
- Pick the encoding (UTF-8 by default) and whether each row is a code point or a grapheme.
- Choose the format of the byte stream (hex, binary, decimal or octal) and turn on the BOM if you need one.
- Read the summary for the total size, then copy the byte stream.
Common use cases
- Finding out why a string is longer in bytes than in characters when it hits a database column or an API size limit.
- Checking the exact bytes of a non-ASCII character before writing a test fixture or a binary protocol message.
- Understanding mojibake: seeing that é is C3 A9 in UTF-8 and therefore appears as é when misread as Latin-1.
- Comparing how much space the same text takes in UTF-8, UTF-16 and UTF-32.
Examples
Try this input in the tool above:
Héllo €😀
48 C3 A9 6C 6C 6F 20 E2 82 AC F0 9F 98 80
Privacy
UTF-8 Byte Viewer runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
The tool shows how text is encoded, not what a file on disk contains: use a hex viewer for that. Unpaired surrogates cannot be encoded in UTF-8 or UTF-32 and are shown as U+FFFD. Only the first 100,000 characters are analysed.
Frequently asked questions
How many bytes is an emoji in UTF-8?
Almost always four, because emoji live above U+FFFF. A sequence such as a family emoji joins several emoji with zero-width joiners (3 bytes each), so it can take 18 bytes or more.
What is the difference from the Unicode Inspector?
The inspector describes characters: category, script, HTML entity. This tool concentrates on bytes: counts, bit patterns, several encodings, byte order and BOM.
Why do UTF-16 and UTF-32 show different bytes for the same text?
UTF-16 uses two or four bytes and UTF-32 always four; both depend on byte order (little or big endian). UTF-8 has no byte-order issue, which is one reason it dominates on the web.
Related tools
Unicode Character Inspector
Paste text or an emoji and see exactly which code points, bytes and scripts it is made of.
Encoding & Decoding
Text to Hex Converter
See the exact bytes behind any text, from a quick "Hello" to emoji, formatted the way your code or debugger expects.
Encoding & Decoding
Text to Binary Converter
Turn words into ones and zeros: each byte of your text is shown as eight bits.
Encoding & Decoding
Text to Decimal Converter
Get the Unicode number of every character: "é" is 233, "世" is 19990 and 😀 is 128512.
Encoding & Decoding
Code Point Finder (Unicode Lookup)
Type code points in any common notation, or a range, and see the characters with their decimal, hex, UTF-8, UTF-16 and HTML entity forms.
Encoding & Decoding
Hex Viewer
Drop a file to see its raw bytes in the familiar offset | hex | ASCII layout, plus its detected type and size.
File Tools
Character Counter
See exactly how long your text is in characters, Unicode code points and bytes, and how many characters remain before a limit.
Text Tools
Unicode Escape Converter
Turn é, ☕ and 😀 into \u00E9, \u2615 and \uD83D\uDE00 (or another escape style) for source code, JSON or CSS.
Encoding & Decoding