UTF-8 to Binary Converter

Encodes text using the browser's TextEncoder (real UTF-8 byte encoding) and renders every resulting byte as an 8-bit binary octet, so multi-byte characters show exactly the bytes a UTF-8-aware system would actually store or transmit. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-27

Overview

Introduction

Most "text to binary" tools convert each character's numeric code point straight to binary, which works fine for plain ASCII but silently diverges from reality once non-ASCII characters are involved.

This tool instead encodes text through the browser's real UTF-8 encoder first, then shows the exact bytes that encoding produces — the same bytes a file, database, or network socket would actually store.

What Is UTF-8 to Binary Converter?

A converter that turns text into its true UTF-8 byte representation, with each byte displayed as an 8-bit binary octet.

It relies on the standard `TextEncoder` API rather than any custom code-point math, so the output always matches what a real UTF-8 encoder would produce.

How UTF-8 to Binary Converter Works

The input string is passed to `TextEncoder().encode()`, which returns a `Uint8Array` of the text's UTF-8 bytes — 1 byte per ASCII character, 2-4 bytes for characters outside the ASCII range.

Each byte in that array is converted to an 8-bit binary string with leading zeros preserved, and the octets are joined with single spaces.

When To Use UTF-8 to Binary Converter

Use it whenever you need to see or verify the actual on-the-wire or on-disk byte layout of text, such as when debugging encoding issues in a file format or network protocol.

It's also useful for teaching how UTF-8's variable-width byte encoding works on real multi-byte characters, not just ASCII.

Features

Advantages

  • Uses the browser's built-in UTF-8 encoder, so the byte output is guaranteed correct rather than approximated.
  • Handles the full Unicode range, including emoji and other 4-byte characters.
  • Every octet is a clean, fixed 8 bits, making the output easy to split, count, or feed into other byte-oriented tools.

Limitations

  • Output is UTF-8 specifically; it does not support other encodings like UTF-16 or Latin-1.
  • Long inputs with many multi-byte characters can produce a much longer octet sequence than the visible character count suggests.

Examples

Plain ASCII text

Input

Hi

Output

01001000 01101001

H is byte 72 (01001000) and i is byte 105 (01101001) — one byte per character since both are ASCII.

A multi-byte character

Input

é

Output

11000011 10101001

é (U+00E9) falls outside ASCII, so UTF-8 encodes it as two bytes: 0xC3 (11000011) and 0xA9 (10101001).

Best Practices & Notes

Best Practices

  • When comparing byte counts against character counts, remember non-ASCII characters can expand to 2-4 bytes each.
  • Pair this with the Binary to UTF-8 Converter to round-trip and confirm the encoding matches what you expect.

Developer Notes

Implemented with the standard `TextEncoder` Web API to produce real UTF-8 bytes, then formatted with `byte.toString(2).padStart(8, "0")` per byte — no custom UTF-8 encoding logic is hand-rolled.

UTF-8 to Binary Converter Use Cases

  • Debugging why a file or network payload has more bytes than expected characters
  • Teaching UTF-8's variable-width multi-byte encoding with concrete examples
  • Generating byte-accurate binary test fixtures from text

Common Mistakes

  • Assuming one character always equals one byte, which only holds for ASCII (code points 0-127).
  • Confusing this tool's true byte-level output with a code-point-to-binary converter's output — they only agree for ASCII text.

Tips

  • Try a character outside the Latin alphabet (like é, €, or an emoji) to see UTF-8's multi-byte expansion in action.
  • Count the octets in the output to see exactly how many bytes your text would occupy when saved as UTF-8.

References

Frequently Asked Questions