Text to Binary: How Letters Become Ones and Zeros
Every piece of text on a computer is stored as numbers, and those numbers are stored as binary: patterns of ones and zeros. When you type the letter A, the computer does not store a picture of the letter; it stores a code number, and that number in binary is what the machine actually holds. The Text to Binary Encoder converts text into its binary form, and understanding the conversion explains a surprising amount about how computers handle language, from file sizes to character encoding problems.
The foundation is the byte: 8 bits, each a one or a zero, giving 2 to the power of 8, or 256, possible values. The classic encoding that maps characters to byte values is ASCII, where the capital letter A is 65, B is 66, and the lowercase a is 97. Modern text uses Unicode, which covers far more characters, but its most common encoding, UTF-8, keeps ASCII values identical for the first 128 characters, so the letter A is still 65 in UTF-8, and its binary form is the same. That compatibility is why ASCII examples still work: for basic English text, ASCII and UTF-8 agree, and the binary you see from an encoder is the same either way.
Converting a decimal number to binary is a repeated division by two. Divide the number by two, record the remainder, which is 0 or 1, then divide the quotient by two and repeat until the quotient is zero. Reading the remainders from last to first gives the binary form. For the letter A, 65, the divisions go: 65 ÷ 2 = 32 remainder 1, 32 ÷ 2 = 16 remainder 0, 16 ÷ 2 = 8 remainder 0, 8 ÷ 2 = 4 remainder 0, 4 ÷ 2 = 2 remainder 0, 2 ÷ 2 = 1 remainder 0, 1 ÷ 2 = 0 remainder 1. Reading the remainders backwards gives 1000001, which is 7 bits, and padding it to a full byte gives 01000001. That padding matters: binary text is conventionally shown in 8-bit groups, and a missing leading zero makes the byte hard to read and easy to miscount.
Characters beyond basic English need more than one byte in UTF-8, and that is where encoding confusion begins. An accented letter such as é is a single character but two bytes in UTF-8, and an emoji can be four bytes. A tool that shows one byte per character is assuming ASCII, and it will mishandle anything beyond it, while a tool that encodes as UTF-8 shows the full multi-byte sequence. If binary output for a non-English word looks unexpectedly long, multi-byte encoding is the explanation, not an error. The same principle explains file sizes: a text file's size in bytes is roughly its character count only for plain ASCII, and any accented or non-Latin text takes more bytes than characters.
A worked example you can follow
Encode the word "Hi" by hand. H is ASCII 72 and i is ASCII 105. Convert 72: 72 ÷ 2 = 36 remainder 0, 36 ÷ 2 = 18 remainder 0, 18 ÷ 2 = 9 remainder 0, 9 ÷ 2 = 4 remainder 1, 4 ÷ 2 = 2 remainder 0, 2 ÷ 2 = 1 remainder 0, 1 ÷ 2 = 0 remainder 1. Reading backwards gives 1001000, padded to 8 bits: 01001000. Convert 105: 105 ÷ 2 = 52 remainder 1, 52 ÷ 2 = 26 remainder 0, 26 ÷ 2 = 13 remainder 0, 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1. Reading backwards gives 1101001, padded to 8 bits: 01101001. So "Hi" in binary is 01001000 01101001, which is 2 bytes, or 16 bits, and the arithmetic checks out: 2 characters × 8 bits = 16 bits.
Verify the conversion by decoding it back. Split the binary into 8-bit groups, convert each group to decimal by adding the place values of its ones: 01001000 has ones in the 64 and 8 positions, 64 + 8 = 72, which is H, and 01101001 has ones in the 64, 32, 8 and 1 positions, 64 + 32 + 8 + 1 = 105, which is i. The round trip returns "Hi", confirming the encoding. A space is ASCII 32, or 00100000, so a phrase with spaces has a byte for each space too, and counting bytes in the output should match the character count for ASCII text, including spaces.
Common mistakes to avoid
The most common mistake is forgetting the leading zeros, producing 7-bit groups that are hard to read and easy to misalign. A second mistake is assuming one byte per character for non-English text, which undercounts UTF-8 multi-byte characters. A third mistake is confusing binary with hexadecimal, which is a different base and a different notation, though both represent the same values. A fourth mistake is encoding text with the wrong character set, so the binary decodes to different characters on another system. A fifth mistake is treating binary as encryption: binary encoding is a representation, not a secret, and anyone can decode it instantly, so it protects nothing.
Binary is the bottom layer of text, and seeing it makes the layers above it clearer: characters are numbers, numbers are bits, and every file, message and page is a long sequence of those bits, grouped and interpreted by agreed rules.
Frequently asked questions
Is binary the same as ASCII? No. Binary is the number system, and ASCII is one mapping from characters to numbers; the numbers are then written in binary.
Why 8 bits per character? Because a byte of 8 bits holds 256 values, enough for the classic character set, and UTF-8 extends the idea with multi-byte sequences for larger character sets.
Can I read binary fluently? With practice you can recognise common bytes, such as 01000001 for A, but fluency is rarely needed; the value is in understanding the conversion, not memorising it.
For related encoding help, see Binary to Text Decoder Guide, and pair this encoder with the Binary to Text Decoder and the ASCII Converter when exploring character encodings. Divide by two, read the remainders backwards, and pad to a full byte.