Binary Translator — Text to Binary & Binary to Text
Convert text to binary and decode binary back to text in your browser. Supports UTF-8 and 8-bit ASCII, an adjustable byte separator, and live character, byte, and bit counters. No signup, nothing uploaded, sources cited below.
How it works
Computers store text as numbers. Each character maps to a Unicode code point — a number defined by the Unicode Standard — and that number is stored as one or more 8-bit bytes. A binary translator is just this lookup made visible: it turns each byte into its base-2 form (eight 0s and 1s) and joins them together. Every step is deterministic and defined by a published standard; there is no estimation involved.
Text → Binary. The input is split into code points using the JavaScript string iterator, so a surrogate pair such as an emoji is treated as one character. Each code point is then encoded to bytes:
- U+0000–U+007F → 1 byte:
0xxxxxxx - U+0080–U+07FF → 2 bytes:
110xxxxx 10xxxxxx - U+0800–U+FFFF → 3 bytes:
1110xxxx 10xxxxxx 10xxxxxx - U+10000–U+10FFFF → 4 bytes:
11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
That byte layout is the UTF-8 algorithm from RFC 3629. This tool uses the browser's standard TextEncoder (defined by the WHATWG Encoding Standard) to produce the bytes, and independently cross-checks them against a hand-written RFC 3629 encoder — when they agree, the calculator shows an “RFC 3629 verified” badge. Each byte is then written as byte.toString(2).padStart(8, "0") and the bytes are joined with your chosen separator. In ASCII (8-bit) mode each character's code point is used directly as one byte, and any code point above 127 is rejected with a clear message rather than being silently mangled.
Binary → Text. The tool strips whitespace and your separator, checks that only 0s and 1s remain, and verifies the total bit count is a multiple of 8 — otherwise it tells you how many bits are missing. It then splits the stream into 8-bit bytes, parses each with base-2 parseInt, and decodes. UTF-8 decoding uses a fatal TextDecoder, so an invalid byte sequence is reported as an error instead of being replaced with a question-mark box. Because the encode and decode paths use the same standards, a UTF-8 round-trip (text → binary → text) always returns the original text unchanged.
Worked examples
Frequently asked questions
Sources & references
- RFC 3629 — UTF-8, a transformation format of ISO 10646
- WHATWG Encoding Standard — TextEncoder / TextDecoder behaviour
- The Unicode Standard — code charts (canonical code-point assignments)
- Unicode — Basic Latin (ASCII) code chart, U+0000–U+007F
The encoding tables and algorithm on this page were last cross-checked against RFC 3629 and the Unicode code charts on 2026-07-17. The standards are stable; this page is reviewed whenever the Unicode or Encoding specifications are revised.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.