HandyTools Hub

Text ↔ Binary Converter

Convert text to binary and back instantly

0 chars
0 chars

The Text to Binary converter rewrites ordinary text as strings of 0s and 1s, and turns those strings back into readable characters. Choose 7-bit or 8-bit groups, pick how bytes are separated, and the result updates as you type. It is for students learning how computers represent characters, developers checking the byte values behind a string, and anyone who needs to encode a short message in binary.

How to Use

  1. Choose a direction. Text to Binary encodes; Binary to Text decodes. The conversion runs both ways from the same input field.
  2. Pick the bit width. 7-bit covers standard ASCII; 8-bit covers ASCII plus Latin-1 characters such as accented letters.
  3. Set the byte separator. A space between bytes is the default because it is readable; double spaces or no separator are available when a target system expects a specific format.
  4. Enter text or paste binary, then copy the output. The character count helps you confirm that nothing was dropped in a copy-paste.

A Worked Example: “Hi” Byte by Byte

Take the two-character string Hi.

  • H is ASCII code 72. As an 8-bit binary number: 01001000.
  • i is ASCII code 105. As 8-bit binary: 01101001.

Encoded with a single space between bytes, the result is 01001000 01101001. To decode, do the reverse: split on spaces, read each group of eight bits as a binary number (01001000 → 64 + 8 = 72 → H), and concatenate the characters.

The same method scales to any ASCII text. A 20-character sentence becomes 20 bytes, or 160 bits — which is why binary is precise but bulky, and why hexadecimal and Base64 exist as more compact representations.

7-bit, 8-bit, and Where UTF-8 Fits

ASCII was defined as a 7-bit code, giving 128 values: control codes 0–31, then space, punctuation, digits, uppercase, and lowercase letters up to 126, with 127 reserved. Seven bits were convenient for the hardware of the time but left just 128 slots, which is enough for English and nowhere near enough for the world’s writing systems.

The first expansion was 8-bit, which adds 128 more values (128–255) for accented Latin letters, currency signs, and box-drawing characters — the Latin-1 range. Beyond that, modern text uses Unicode, most commonly encoded as UTF-8, where a single character can take two, three, or four bytes. That is why this tool stops at 8-bit: it teaches the byte-based model cleanly, and a Chinese character or emoji would not fit in one group.

A useful rule when reading binary: always know how many bits per unit. The same sequence 01001000 01101001 is “Hi” in 8-bit mode; decode it as 7-bit and it becomes nonsense. The encoding is not self-describing.

Common Mistakes

  • Dropping leading zeros. 72 is 1001000 in binary, but as a byte it must be written 01001000. Stripping the leading zero shifts every following bit out of alignment.
  • Mixing bit widths. Encode in 7-bit, decode in 8-bit, and the characters will shift. Match the setting on both ends.
  • Confusing binary with hex or Base64. They are all encodings of the same bytes; binary simply spells out every bit. Converting between them is lossless.
  • Assuming one byte per character. True only for ASCII and Latin-1. For Unicode text, one character may span several bytes, so character counts and byte counts differ.
  • Using binary for storage or transfer. It is the least compact common representation; use it for teaching and inspection, not for payload size.

Once binary stops looking like a novelty, the same eight-bit thinking shows up throughout computing. A Unix permission like 755 is three groups of three bits — read, write, and execute for owner, group, and others. A subnet mask such as 255.255.255.0 is 24 set bits followed by eight zeros, which is why the /24 shorthand works. Feature flags passed as READ | WRITE pack several booleans into one integer, and checking a single flag means testing one bit with flags & 0b100. Learning to read a byte here is the same skill you apply to permissions, network masks, and bitwise options.

Features

  • Bidirectional text ↔ binary conversion with instant results
  • 7-bit ASCII and 8-bit Latin-1 modes
  • Selectable byte separator: space, double space, or none
  • Live character count to verify input and output length
  • One-click copy to the clipboard
  • 100% client-side — nothing is uploaded

Use Cases

  • Learning: See exactly how a character maps to a byte, one bit at a time.
  • Teaching: Demonstrate number bases and character encoding in a classroom.
  • Debugging: Inspect the byte values behind a string when a service mishandles it.
  • Puzzles: Encode a short message in binary for a game or a scavenger hunt.
  • Low-level work: Confirm bit patterns against a datasheet or protocol spec.

Frequently Asked Questions

Why does the letter A become 01000001?

Computers store characters as numbers, and 'A' is 65 in ASCII. Writing 65 in binary gives 01000001 — one bit for each of the powers 64, 32, 16, 8, 4, 2, and 1. The leading zero is kept so the value fills a full 8-bit byte. Decoding reverses the steps: group the bits into eights, convert each group to its decimal number, and map that number back to a character.

What is the difference between 7-bit and 8-bit mode?

7-bit mode writes the ASCII range only, using seven binary digits per character and covering 128 symbols — English letters, digits, and common punctuation. 8-bit mode uses a full byte and reaches 256 values, which covers Latin-1 characters such as é, ü, and ñ. For anything outside those ranges, such as emoji or Chinese text, use a UTF-8-aware converter rather than this one.

Is binary the same as Base64 or hexadecimal?

No — all three represent the same bytes differently. Hexadecimal is compact because one hex digit stands for four bits; Base64 packs six bits per character so the text stays printable; binary spells out all eight bits, which is the most transparent and the least compact. Converting between them does not change the underlying data.

Why does the binary have spaces between groups?

Those spaces are the byte separator, and they exist for human readability: 01001000 01101001 is far easier to read than 0100100001101001. If your target system expects an unbroken string, switch the separator to none before copying.

Can I decode binary that uses 7-digit groups?

Yes — select 7-bit mode before decoding. This matters because a message encoded without leading zeros loses its alignment: 1000001 could be 7-bit 'A' or the tail of an 8-bit sequence. Knowing which mode produced the data is part of the message, so decode with the same setting you encoded with.

Does the tool support non-Latin characters?

Only up to 8-bit (Latin-1). Characters outside that range — Cyrillic, Chinese, emoji — need Unicode, where a single character can occupy two, three, or four bytes. This tool is aimed at teaching and at ASCII/Latin-1 data; for modern text, use a UTF-8 encoder or a full encoding library.

Reviewed by the HandyTools Hub team · Last updated