CruxDevCruxDev Tools Prompts
text Utility • Zero-Server Privacy • 100% Client-Side

Text ↔ Binary Converter

Convert text to 8-bit binary and back — full UTF-8 support including emoji, with separator options.

Overview

Converts text to 8-bit binary and back with true UTF-8 fidelity, including emoji and non-Latin scripts. Choose space, newline or no separator when encoding; when decoding, the tool validates your bits and explains exactly what is wrong instead of returning garbage.

How It Works

Switch between Text to Binary and Binary to Text. In encode mode, type text and pick a separator; every UTF-8 byte of the input appears as a padded 8-bit group. In decode mode, paste groups of binary digits — any whitespace is ignored, so space-, newline- or compact-separated input all works — and the characters appear if the bits form whole bytes. Invalid input (non-binary characters, or a bit count that is not a multiple of eight) produces a clear error message rather than silent nonsense.

Step-by-Step Usage Guide

  1. Pick the direction with the Text to Binary / Binary to Text toggle.
  2. In encode mode, choose a separator: space for readability, none for compactness, newline for one byte per line.
  3. In decode mode, paste binary digits in any whitespace arrangement; the tool validates that only 0s and 1s are present and that the count is a multiple of eight.
  4. Copy the output from the result box.

Technical Specifications & Standards

This is a byte-accurate UTF-8 codec, not a char-code shortcut. Encoding pushes the input through TextEncoder, which produces the actual UTF-8 byte sequence — 'C' is one byte 01000011, an accented e is two bytes, and the globe emoji is four bytes (F0 9F 8C 8D) — each rendered as an 8-bit group. Decoding reverses it with TextDecoder: bits are concatenated, parsed into a Uint8Array and decoded with the UTF-8 standard, so multi-byte characters reassemble correctly and invalid byte sequences raise a caught error. Two properties follow. First, byte counts differ from character counts: a three-character string like a letter, an emoji and a letter is six groups, not three. Second, the decoder strips all whitespace before validating, which means it accepts input formatted in any of the three separator styles, but it will also happily read a compact stream however the digits parse — the bits, not the spacing, are the data.

Targeted Use Cases

  • Understanding and teaching UTF-8: seeing exactly how many bytes an accented letter or emoji really occupies.
  • Debugging protocol or file-format work where payloads are specified as byte streams.
  • Decoding binary strings found in puzzles, CTF challenges or old chat messages.
  • Generating deterministic test fixtures of bytes for parsers, where you need a specific byte pattern with a known text meaning.

Notes & Gotchas

  • Expect 8 bits per byte, not per character — multi-byte UTF-8 characters produce several groups.
  • When decoding untrusted input, check the group count first; a bit count not divisible by eight is rejected outright.
  • Use spaces or newlines when humans will read the binary; use no separator when machines will.
  • Do not use this as a security measure — binary is a representation, not encryption, and reverses trivially.

Frequently Asked Questions

Why does one emoji become 32 bits?

The tool encodes UTF-8 bytes, and most emoji occupy four bytes. Each byte is shown as an 8-bit group, so an emoji is four groups; a plain ASCII letter is one group.

Is this binary UTF-8 or ASCII?

UTF-8. ASCII text looks identical in both because UTF-8 encodes the ASCII range as single bytes, but accented letters, CJK and emoji are encoded as multi-byte sequences exactly as the UTF-8 standard defines.

Can I decode binary without spaces?

Yes. The decoder strips all whitespace before parsing, so compact, space-separated and newline-separated input all decode identically, as long as the total number of bits is a multiple of eight.

Why do I get an error instead of text?

The decoder requires only the digits 0 and 1 and a total bit count divisible by eight. Anything else would produce garbage bytes, so the tool reports the requirement instead of guessing.