Skip to content

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

Options
0 chars · 0 lines
The result will appear here.

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?

  1. Type or paste your text. The table and the byte stream update as you type.
  2. Pick the encoding (UTF-8 by default) and whether each row is a code point or a grapheme.
  3. Choose the format of the byte stream (hex, binary, decimal or octal) and turn on the BOM if you need one.
  4. 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:

Input
Héllo €😀
Output
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.

More tools in Encoding & Decoding →