Explainer 5 min read

How to Convert Text to Binary (and Binary Back to Text)

How letters become 8-bit binary codes using ASCII, with worked examples like "Hi" = 01001000 01101001, a mini table, decoding steps and common mistakes.

text to binarybinary to textconvert words to binaryascii to binarybinary code translator

The short answer

To convert text to binary, replace each character with its character code (A = 65, a = 97, space = 32) and write that number in base 2 as 8 digits. "Hi" becomes 01001000 01101001. To go back, split the binary into 8-digit groups, convert each group to a number and look up the character. The Binary Translator does both directions instantly and also shows the hexadecimal and decimal codes.

How text becomes binary

Computers store text as numbers. A character encoding is the agreed list that says which number means which character. For English letters, digits and common punctuation, the codes come from ASCII, which assigns numbers 0 to 127. Those codes are the same in Unicode and in UTF-8, which is what nearly all modern text uses.

Binary is just another way to write those numbers, using only 0 and 1. Each position is worth double the one to its right:

Position value1286432168421
H = 7201001000
i = 10501101001

72 = 64 + 8, so the 64 and 8 positions are 1. 105 = 64 + 32 + 8 + 1. Writing all eight positions, with leading zeros, gives one byte per character.

Converting by hand, step by step

  • Find the character code. Use the table below or any ASCII chart.
  • Subtract the largest position value that fits, starting from 128, and write 1 for that position. Write 0 for positions that do not fit.
  • Continue with the remainder until you reach 0.
  • Pad to 8 digits with zeros on the left.
  • Separate characters with a space so they can be read back.
  • Example: "Cat"

    • C = 67 = 64 + 2 + 1 → 01000011
    • a = 97 = 64 + 32 + 1 → 01100001
    • t = 116 = 64 + 32 + 16 + 4 → 01110100

    Result: 01000011 01100001 01110100. We checked every example in this article by running the tool's own conversion code.

    Mini reference table

    CharacterDecimalHexBinary
    space322000100000
    !332100100001
    0483000110000
    A654101000001
    H724801001000
    a976101100001
    e1016501100101
    l1086C01101100
    o1116F01101111

    Two useful patterns:

    • Upper and lower case differ by one bit. A is 01000001 and a is 01100001. The third digit from the left (worth 32) is the only difference, and the same holds for every letter.
    • Digits are not their own value. The character "0" is code 48, 00110000, not 00000000. Converting the number 5 as a value is a different job; for that, use a number base converter.

    Using the Binary Translator

    Text to binary

  • Open the Binary Translator. It starts in Text → Binary mode with "Hello" as an example.
  • Type or paste your text. The output updates as you type.
  • You get three results, each with a Copy button: the binary (8-bit groups separated by spaces), the hexadecimal codes and the decimal codes.
  • "Hello" gives 01001000 01100101 01101100 01101100 01101111, hex 48 65 6C 6C 6F and decimal 72 101 108 108 111.

    Binary to text

  • Click Binary → Text.
  • Paste binary with a space (or line break) between each character's group.
  • Read the decoded text. A group that starts with anything other than 0 or 1 appears as ?.
  • Everything runs in your browser; nothing you type is sent anywhere.

    Common mistakes when decoding

    No spaces between bytes. 0100100001101001 is meant to be "Hi", but without a space the tool reads it as one large number and shows a single unrelated character. Insert a space after every 8 digits.

    Digits other than 0 and 1. A group like 01001002 contains a 2. The tool reads only the digits before the 2 and shows a wrong character, not an error. Check copied text for stray characters, letter O instead of zero, or the letter l instead of the digit 1.

    Missing leading zeros. 1001000 (7 digits) still decodes to H, because leading zeros do not change the value, but 8-digit groups are easier to check and are what most puzzles and lessons expect.

    Accented letters, symbols and emoji

    The tool converts each character using the code JavaScript reports for it:

    • Latin accents like é (code 233) still fit in 8 bits: 11101001. Note that in UTF-8 files, é is actually stored as two bytes, 11000011 10101001, so you may see a different answer in other tools.
    • Characters above 255, such as ₹ (code 8377), produce longer groups: 10000010111001 (14 digits). The tool does not split them into UTF-8 bytes.
    • Emoji are stored by JavaScript as two codes, so 😀 appears as two 16-digit groups.

    These longer groups decode back correctly in this tool, but other decoders that expect 8-bit UTF-8 bytes will not understand them. For plain English text, every tool agrees.

    Where text-to-binary is useful

    • Computer science homework on encoding and number systems.
    • Puzzles, escape rooms and treasure hunts, where a message is hidden as 0s and 1s.
    • Understanding file sizes: each ASCII character is one byte, so 1,000 plain English characters take about 1,000 bytes.

    It is not encryption. Anyone can decode binary text in seconds, so never use it to hide passwords or private messages. For actual protection, see the Text Encryption tool.

    For converting numbers (rather than text) between binary, decimal and hexadecimal, read Binary, Decimal, Hexadecimal: Converting Between Number Systems.

    Frequently asked questions

    How do you write "Hi" in binary?

    H is character code 72 and i is 105, so "Hi" in 8-bit binary is 01001000 01101001.

    Why does my binary decode to a strange character?

    The groups are probably not separated. Put a space after every 8 digits so each character is read separately, and check there are no digits other than 0 and 1.

    What is the difference between A and a in binary?

    A is 01000001 (65) and a is 01100001 (97). They differ only in the bit worth 32, and that is true for every letter of the English alphabet.

    Is converting text to binary a form of encryption?

    No. Binary is a standard way to write character codes and anyone can decode it instantly. Use real encryption to protect private text.

    Try this tool on Lazyblink

    Put this guide into practice with our free online tool — no signup required.

    Open tool