Text to Binary Translator: Convert Text to Binary, Hex and Back

Type a message and see it as binary code, or paste binary, hexadecimal, decimal or octal values and read the text. The translator uses UTF-8, so it works for letters with accents and emoji, and lets you choose the separator between bytes.

Related Tools

Number Base Converter Base64 Encoder & Decoder Roman Numeral Converter Hash Generator (MD5, SHA-256) URL Encoder & Decoder All Utilities

How text becomes binary

Computers store everything as numbers, and numbers as bits, which are 0s and 1s. To store text, each character is given a number by an encoding such as ASCII or Unicode. The letter A is 65, and 65 in binary is 01000001. A message is simply a list of those numbers, so the word Hello becomes 01001000 01100101 01101100 01101100 01101111.

This translator performs that conversion in both directions. It can show the bytes in binary, hexadecimal, decimal or octal, which are all different ways of writing the same numbers.

How to use the translator

  1. Choose Text to code and type your message, or choose Code to text and paste the values.
  2. Pick the format: binary, hexadecimal, decimal or octal.
  3. Choose how bytes are separated: space, comma, new line or none.
  4. Copy the result, or press Use result as input to convert it back.
  5. If decoding fails, check the message that shows which value is not valid.

ASCII and UTF-8

ASCII, created in the 1960s, assigns numbers from 0 to 127 to English letters, digits and punctuation. Each character fits in seven bits, and is normally stored in one 8-bit byte. UTF-8 is the modern encoding of Unicode. It uses the same single byte for ASCII characters, so plain English text looks the same, but other characters take two to four bytes.

For that reason a letter such as e with an accent is two bytes, C3 A9 in hexadecimal, and an emoji uses four. The translator uses UTF-8, so any text you type can be converted and decoded back without loss.

Reading binary by hand

  • Split the binary into groups of eight bits, one for each character.
  • Give each bit a value from the right: 1, 2, 4, 8, 16, 32, 64 and 128.
  • Add the values of the bits that are 1. 01001000 is 64 + 8 = 72.
  • Look up the number in an ASCII table: 72 is the letter H.
  • Repeat for each group to read the whole message.

Uses of text to binary conversion

  • Learning how computers store text in computer science classes.
  • Puzzles, escape rooms and secret messages in games and geocaching.
  • Debugging encodings and checking the exact bytes of a string.
  • Fun gifts, such as writing a name or a message in binary on a poster or jewelry.

Example: a short message

The word Hi is two characters. H is 72, which is 01001000, and i is 105, which is 01101001, so Hi becomes 01001000 01101001. In hexadecimal the same two bytes are 48 69, and in decimal 72 105. Paste any of these forms into the Code to text mode and the translator turns them back into Hi, which is a quick way to check that you understand the encoding.

ASCII examples

Character Decimal Binary
A 65 01000001
a 97 01100001
H 72 01001000
0 48 00110000
Space 32 00100000
! 33 00100001

Frequently Asked Questions

How do I convert text to binary?

Type your text, choose binary and copy the result. Each character becomes one or more 8-bit groups.

How do I convert binary to text?

Choose Code to text, paste the binary and read the message.

What is Hello in binary?

01001000 01100101 01101100 01101100 01101111.

Does it support emoji and accents?

Yes. Text is encoded as UTF-8, where such characters use several bytes.

Why does binary have 8 digits per letter?

Each character is stored in a byte, which is 8 bits.

Can I use hexadecimal instead?

Yes. Choose hexadecimal, decimal or octal in the format list.

Is my text uploaded?

No. The conversion happens in your browser.