Text Tools

How Text Becomes Binary: ASCII, Bytes, and Character Codes Explained

Every Character Is Secretly a Number

Computers don't actually store letters — they store numbers, and a shared agreement (a character encoding standard) defines which number represents which letter. The capital letter "A" isn't stored as a picture of the letter A; it's stored as the number 65. A space is 32. This mapping between symbols and numbers is what makes text possible on a computer in the first place.

ASCII: The Original Mapping

ASCII, defined in 1963, assigns numbers 0 through 127 to the English alphabet (uppercase and lowercase), digits, common punctuation, and a handful of control characters like tab and newline. It became the foundational standard that later, larger character sets built upon rather than replaced outright.

From Number to Binary

Once a character has a number, that number gets converted to binary the same way any decimal number does — repeatedly dividing by 2 and recording the remainders. The letter "H" (72 in ASCII) becomes 01001000 in binary, padded to exactly 8 digits (1 byte), since that's the standard unit computers use to store a basic character.

From Binary to Hex: A Convenient Shortcut

Hexadecimal exists largely because it maps so cleanly onto binary — each single hex digit represents exactly 4 binary digits, so a full byte (8 binary digits) becomes exactly 2 hex digits. The byte 01001000 becomes 48 in hex. This is why hex shows up constantly in programming and debugging: it's far more compact to read than a long string of 0s and 1s, while still mapping to the underlying binary in a completely predictable way.

Beyond Basic English: Unicode and UTF-8

ASCII's 128 characters cover English text but nothing else — no accented letters, no non-Latin scripts, no emoji. Unicode extends the same core idea (assigning a unique number to every character) to cover virtually every writing system in use, and UTF-8 is the most common way those larger numbers get stored as actual bytes. UTF-8 is cleverly backward-compatible: any character in the original ASCII range still uses exactly 1 byte, identical to old ASCII encoding — but characters outside that range need 2, 3, or even 4 bytes to represent, which is why an emoji takes up noticeably more space in a file than a plain letter does.

Ready to see this conversion happen with your own text?

Open Binary / Hex Converter