Text to Binary Converter (UTF-8) – Free

This text to binary converter encodes your text as UTF-8 and prints every byte as eight binary digits. Plain English letters take one byte each, and other characters take two to four.

How to use the Text to Binary tool

  1. Type or paste any text into the UTF-8 text box.
  2. Select Convert, or select Example to see the word Hi converted.
  3. Read the bytes in the Result box. Each group of eight bits is one byte, and groups are separated by spaces.
  4. Select Copy to copy the binary string, or Clear to start over.

How text becomes binary

Computers store text as numbers, and an encoding decides which numbers. This tool uses UTF-8, the encoding defined in RFC 3629 and used by the web, JSON and nearly every modern file format. The text is turned into a sequence of bytes, and each byte is written in base 2, padded with zeros on the left to a full eight digits.

For the letter H the byte is 72, which is 01001000. For i it is 105, or 01101001. Put together, Hi is 01001000 01101001.

Multi-byte characters in UTF-8

Characters in the ASCII range fit in one byte that starts with 0. Everything else is spread over several bytes: a lead byte whose opening bits announce the length, then continuation bytes that all start with 10.

The x positions in the patterns below hold the bits of the character's Unicode code point. The letter é is U+00E9, binary 11101001. Padded to eleven bits and split as 00011 and 101001, it fills the two-byte pattern to give 11000011 10101001.

  • 0xxxxxxx: one byte, code points up to U+007F.
  • 110xxxxx 10xxxxxx: two bytes, up to U+07FF.
  • 1110xxxx 10xxxxxx 10xxxxxx: three bytes, up to U+FFFF.
  • 11110xxx followed by three continuation bytes: four bytes, up to U+10FFFF.
Hi  →  01001000 01101001
é   →  11000011 10101001
€   →  11100010 10000010 10101100
🌍  →  11110000 10011111 10001100 10001101

Details of the output

A few points help when you compare the result with a hex dump or another encoder.

  • Every byte is exactly eight digits, with a single space between bytes.
  • Spaces in your text are encoded as 00100000 and line breaks as 00001010.
  • Nothing is trimmed or normalized. The bytes are the plain UTF-8 encoding of the text, with no byte order mark added.
  • There is no input that causes an error. An empty box gives an empty result.

Text to binary versus ASCII to binary

For plain English text the two tools on this site print the same bits. The difference is what happens beyond ASCII. ASCII to Binary refuses any character above code 127, which is useful when you must guarantee 7-bit clean data. Text to Binary accepts everything and shows the real UTF-8 bytes. To go back, paste the bits into Binary to Text, which decodes complete bytes as UTF-8.

Frequently asked questions

How do I write Hi in binary?

Hi is 01001000 01101001. The first byte is the code for uppercase H, 72, and the second is the code for lowercase i, 105. Select Example on this page to produce exactly that output.

Why does one character produce more than eight bits?

Characters outside the ASCII range need more than one byte in UTF-8. Accented Latin, Greek and Cyrillic letters take two bytes, most Asian scripts and symbols such as the euro sign take three, and most emoji take four.

Does the converter include spaces between words?

Yes. A space in the text is a character and is encoded as 00100000. Do not confuse it with the spaces in the output, which only separate one byte from the next.

Which encoding does the tool use?

UTF-8, through the browser's built-in text encoder. Other encodings such as UTF-16 or Latin-1 would give different bytes for non-ASCII characters, so make sure the system you compare against also uses UTF-8.

Is my text uploaded?

No. The encoding happens locally with JavaScript in your browser. The text in the box is never transmitted to this site's server.

How do I convert the binary back to text?

Copy the result and paste it into the Binary to Text tool. It expects complete bytes of eight bits, ignores the spaces between them and decodes the bytes as UTF-8.

Related tools