Binary ↔ Text Converter

How do I convert text to binary?

How it is calculated

In encode mode the tool reads the text one byte at a time. For each byte it takes the byte's numeric value (0 to 255), writes it in base 2 and pads the left with zeros to exactly 8 digits. The groups are joined with single spaces. In decode mode the input is split on whitespace and every group must be 1 to 8 binary digits; each group is read as a base-2 number and becomes one byte of output. A single unspaced run whose length is a multiple of 8 is cut into 8-digit bytes first (0100100001101001 gives Hi). Any other token, such as one with a digit other than 0 or 1 or with more than 8 digits, gives no result.

Because the tool works on bytes, plain ASCII letters give one 8-bit group each, while characters outside ASCII (accents, emoji) are stored as several bytes in UTF-8 and so produce several groups. An empty input gives no result.

Worked example

Encode the text Hi!. The three characters have codes 72, 105 and 33. In base 2 these are 1001000, 1101001 and 100001; padded to eight digits they become 01001000, 01101001 and 00100001. Joined with spaces, the result is 01001000 01101001 00100001. Pasting that string back with mode set to decode returns Hi!.

Try this example →

Common mistakes

  • Pasting an unspaced run of binary digits whose length is not a multiple of 8, or a group longer than 8 digits. An unbroken run is cut into bytes only when its length is a multiple of 8; anything else gives no result.
  • Leaving the mode on encode when you paste 0s and 1s, which just encodes the digits themselves as text (each '0' becomes 00110000).
  • Expecting one group per character for accented letters or emoji. In UTF-8 these take two to four bytes, so they appear as several 8-bit groups.
  • Dropping or adding a digit while copying, which shifts the value of a byte and turns the decoded letter into a different character.

About this calculator

This tool converts text into its 8-bit binary representation, where each character is translated into its ASCII (or Unicode byte) code and written out as a string of eight 0s and 1s, or reverses the process by decoding a binary string back into readable characters. Every printable character has a fixed underlying numeric code, and binary is simply that number written in base 2.

It is used mainly for educational purposes, helping students and beginners in computer science see concretely how computers store and represent text as sequences of bits rather than as letters, since this abstraction is often taught conceptually but rarely shown worked out for real words. It also comes up in puzzle-solving, CTF (capture-the-flag) challenges, and hobbyist projects where a message has been hidden or encoded as binary and needs to be read back as plain text.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    The tool works byte by byte. Plain English letters become one 8-bit group each, but characters such as the Turkish ş, ğ or an emoji take several bytes in UTF-8, so they produce several groups. When you decode, separate the groups with spaces; an unspaced run works only if its length is a multiple of 8, and a group over 8 digits or with other characters gives no result. What do you use it for, a class exercise, a puzzle or something else?

Popular calculators

All Calculators