Skip to content

Text to Binary Converter

Convert plain text into 8-bit binary bytes instantly. Choose spaces, commas, new lines, or compact binary output.

Byte separator:
Characters5
Bytes5
Bits40
EncodingUTF-8

How Text Becomes Binary

Computers store text as bytes. This converter encodes your text as UTF-8, then prints each byte as eight binary digits. That makes the result easy to paste into documentation, classroom exercises, puzzles, or code comments.

Code Examples

function textToBinary(text) {
  return [...new TextEncoder().encode(text)]
    .map((byte) => byte.toString(2).padStart(8, "0"))
    .join(" ");
}

Frequently Asked Questions

How do I convert text to binary?

Each character is encoded as one or more UTF-8 bytes, then each byte is written as an 8-bit binary number. The word Hi becomes 01001000 01101001.

Is text to binary the same as ASCII?

For basic English letters, numbers, and punctuation, UTF-8 and ASCII use the same byte values. For emoji and many international characters, UTF-8 uses multiple bytes.

Can I remove spaces between bytes?

Yes. Choose the None separator to output one compact binary string. The binary-to-text converter can read compact strings when the length is divisible by 8.

Related Tools