Text to Binary Translator

Translate text to binary and binary back to text, byte by byte.

Text
Input
Output

How text is stored as binary

Computers store all data — text, images, audio, programs — as sequences of binary digits (bits), where each bit is either 0 or 1. Text is stored by encoding each character as a number, then representing that number in binary.

The most fundamental standard is ASCII (American Standard Code for Information Interchange), which assigns a unique 7-bit number (0–127) to 128 characters: uppercase and lowercase letters, digits, punctuation, and control characters. The letter "A" is ASCII 65 (binary: 01000001), "a" is 97 (01100001), "0" (the digit zero) is 48 (00110000).

Modern text on the web uses UTF-8, a variable-length encoding of Unicode that is backward-compatible with ASCII. ASCII characters take 1 byte in UTF-8; characters from other writing systems take 2–4 bytes. This translator works with UTF-8 encoding, so non-Latin characters like ñ, 日, or emoji will produce more than 8 bits per character.

Common mistakes

  • 8-bit vs 7-bit — ASCII uses 7 bits but is typically stored in 8-bit bytes. Binary representations usually show 8 bits per character, padding with a leading 0.
  • UTF-8 vs UTF-16 — JavaScript strings are UTF-16 internally. This tool uses UTF-8 encoding for the binary output, matching what most web servers and files use.
  • Spaces between bytes — Binary representations use a space to separate each byte for readability. Remove spaces before using the binary in contexts that expect raw binary.