Binary ↔ Text

Convert text to binary and back

About This Calculator

Binary-to-text conversion represents each character as its 8-bit ASCII or UTF-8 binary code. It is used in educational contexts to understand how text is stored in computers, in steganography, and in certain encoding schemes. Each letter, number, or symbol becomes a sequence of eight 0s and 1s.

Formula

Text → Binary: convert each char to ASCII code, then to 8-bit binary
Binary → Text: split into 8-bit groups, convert to decimal, look up ASCII
Space = 00100000 (32); A = 01000001 (65); a = 01100001 (97)
UTF-8 multi-byte: characters above 127 use 2-4 bytes (16-32 bits)

Example Calculation

Convert 'Hi' to binary

  1. H = ASCII 72 = 01001000
  2. i = ASCII 105 = 01101001
  3. Binary: 01001000 01101001
'Hi' = 01001000 01101001

ASCII to Binary for Common Characters

CharDecimalBinaryCharDecimalBinary
A6501000001a9701100001
B6601000010b9801100010
Z9001011010z12201111010
04800110000Space3200100000
!3300100001?6300111111

Frequently Asked Questions

Why do computers use binary?
Computer hardware stores data using two physical states (on/off, high/low voltage, magnetized/demagnetized), making binary the natural representation. Every character, image, video, and program is ultimately stored as billions of binary digits in memory and storage.
How are characters stored in memory?
Characters are stored as their numeric code points in a specific encoding. ASCII uses 1 byte (8 bits) per character for codes 0-127. UTF-8 uses 1 byte for ASCII characters and 2-4 bytes for others. UTF-16 uses 2 bytes per character (common in Windows/Java). The encoding determines how bytes map to characters.
What is the difference between binary and hexadecimal representation?
Binary (base 2) uses 0 and 1; hexadecimal (base 16) uses 0-9 and A-F. They both represent the same binary data but hex is more compact: each hex digit represents exactly 4 binary bits (a nibble). 'A' (ASCII 65) = binary 01000001 = hex 41 — much shorter to write and read.
What is binary-coded text used for?
Educational: understanding computer internals. Steganography: hiding messages in binary patterns. Debugging: reading raw memory dumps. Networking: analyzing packet contents at the bit level. Cryptography: some cipher operations work directly on binary representations of text.