My Tool Studio
Text Tools·4 min read

How Binary Encoding Works, From Text to Bits

Underneath every string you've ever typed sits a row of numbers, and underneath those numbers sit bits. Understanding how binary encoding works turns that abstraction into something you can check by hand: each character maps to a code, each code is written in base 2, and eight digits per character is the convention that makes the stream readable. The Binary ↔ Text tool lets you verify every step of this in both directions. This article walks the full path from the letter A to 01000001 and back.

How binary encoding works in three moves

Character, number, bits.

Text to bits is a two step translation with one formatting rule. Step one: every character has an agreed number. In ASCII, capital A is 65, capital B is 66, a space is 32, and the digit 0 is 48. Step two: write that number in base 2, where each position is worth double the one to its right. The formatting rule: pad to eight digits with leading zeros, because computers store text in eight bit bytes.

That's the whole system. Nothing about it is mysterious once you see that binary is just a different way of writing the same numbers, the way 65 and LXV name the same quantity. The encoding table is the agreement; the bits are bookkeeping.

ASCII to binary by hand: the letter A

One character, worked in full.

Doing ASCII to binary by hand cements it. Take A, code 65. The bit positions in a byte are worth 128, 64, 32, 16, 8, 4, 2, and 1. Is 65 at least 128? No, write 0. At least 64? Yes, write 1 and keep the remainder 1. The 32, 16, 8, 4, and 2 positions all get 0, and the final 1 position gets 1. Reading the digits off: 01000001.

Verify it in the tool: type A, press the Text → Binary button, and 01000001 comes back. Try lowercase a, code 97, and you get 01100001. The only difference is the 32 position flipping on, which is exactly why upper and lower case letters sit 32 apart in the table.

A worked binary conversion: the word Hi

Two bytes, round tripped.

Multi character text just concatenates the recipe. H is code 72, which is 64 plus 8, so its byte is 01001000. Lowercase i is 105, which is 64 plus 32 plus 8 plus 1, giving 01101001. The word Hi therefore encodes as 01001000 01101001, and pasting exactly that into the tool and pressing Binary → Text returns Hi.

The round trip is the real lesson. Encoding and decoding are perfect mirrors, so any message survives the loop unchanged. When a decode comes back as gibberish, the bits were wrong, not the system, and the culprit is almost always grouping or a typo rather than the math.

Reading binary output without losing your place

Patterns that make bits legible.

Reading binary output gets dramatically easier once you spot the prefixes. In eight bit ASCII, every uppercase letter starts with 010, every lowercase letter starts with 011, and every digit starts with 0011. Scan a stream of bytes and you can tell letters from numbers before decoding a single one.

Two more habits help. Count bytes to estimate length: at eight bits plus a space per character, a 27 character sentence is around 243 characters of binary, which the tool's character count confirms. And when hunting for a specific letter, remember the case bit: if you know A is 01000001, then a is the same pattern with the third bit flipped.

Binary conversion mistakes that garble the text

Where round trips go wrong.

Almost every failed decode traces back to one of these.

  • Missing spaces between bytes. The decoder splits on whitespace, so 0100100001101001 without a gap reads as one giant number instead of the two bytes of Hi.
  • Dropped leading zeros. 65 in minimal binary is 1000001, seven digits. Chunks decode fine alone, but concatenating unpadded values makes byte boundaries unrecoverable.
  • Letter O instead of zero. The decoder rejects the chunk and names it in the error, which makes this the easiest mistake to fix.
  • Expecting UTF-8 bytes. The tool encodes each character's code unit value. For accented or non Latin characters that's one long value, not the multi byte sequence a UTF-8 file would contain.

Practice tips for text to binary fluency

Small drills, fast payoff.

Drill with words you can verify. Encode your own name by hand, then check it in the tool; disagreements point straight at the position you miscounted. Predict before you press: guess the first three bits of each character from its case, then confirm. And use the round trip as a self test, encoding on paper and decoding with the Binary → Text button so the tool grades your work.

Binary ↔ Text next to ASCII Table and Base64

Three views of the same bytes.

The ASCII Table is the reference this whole process leans on: when you can't remember whether a comma is 44 or 46, that's the lookup. The Base64 Encoder / Decoder solves a different problem, packing binary data into 64 text safe characters for transport, so its output is dense and unreadable where binary strings are long and legible.

For another take on encoding text as signals, the Morse Code Translator maps the same alphabet to variable length dots and dashes instead of fixed eight bit bytes, and comparing the two systems is a compact lesson in why fixed width won.

Try it now

Open Binary ↔ Text

The tool is one click away. No sign up, no upload, no payment.

Open Binary ↔ Text