3tej home

What is Text to Binary Converter?

A Text to Binary Converter converts Text into Binary directly in your browser. It parses the source format, applies the standard mapping or formula, and outputs the target format ready to copy. Encode any text as 8-bit binary digits (UTF-8).

Text to Binary Converter

Convert any text to 8-bit binary. UTF-8 aware, space-separated output.

🔒 Browser-only ⚡ Instant 💸 Free forever 📡 Works offline 🚫 No signup
← Utilities

TLDR

Type text, click Convert. Each character is encoded as UTF-8 bytes, then each byte becomes 8 binary digits. Useful for learning, puzzles, and protocol debugging.

Runs entirely in your browser. No upload, no signup, no logging. Output is for personal or commercial use; we don't claim any rights.

About text-to-binary conversion

Computers store no letters, only numbers, and ultimately only two states: on and off, 1 and 0. Converting text to binary makes that hidden layer visible. Each character you type is mapped to one or more bytes through a character encoding, and each byte (a value from 0 to 255) is written out as eight binary digits. This tool uses UTF-8, the dominant encoding of the modern web, so it handles plain English, accented letters, and emoji alike.

The standard that assigns numbers to the basic English characters is ASCII, defined in 1963. ASCII gives capital A the value 65, lowercase a the value 97, the digit 0 the value 48, and a space the value 32. UTF-8 is a superset: for those first 128 code points it produces exactly the same single bytes as ASCII, then extends to all of Unicode using 2-, 3-, or 4-byte sequences for everything else. That backward compatibility is why UTF-8 won the web.

Reading binary back is just the reverse: split the stream into 8-bit groups, read each group as a number, and look the number up in the encoding. Because the conversion is fully deterministic, the same text always yields the same binary, and a clean multiple-of-8 binary string always decodes back to the original text.

How it works: the formula

The tool uses the browser's built-in TextEncoder, which produces UTF-8 bytes, then formats each byte as a zero-padded 8-bit string:

bytes  = new TextEncoder().encode(text)        // UTF-8 byte array
binary = bytes
           .map(b => b.toString(2)             // byte -> binary digits
                      .padStart(8, '0'))       // pad to a full 8-bit byte
           .join(' ')                          // space-separate for reading

toString(2) converts a number to base 2; padStart(8, '0') guarantees every byte is a full octet so the stream stays decodable. Nothing leaves your device: open developer tools, watch the Network tab, and you will see no requests fired while you convert.

Worked example: encoding "Hi"

  1. Look up each character. H is ASCII / UTF-8 byte 72; i is byte 105.
  2. Convert 72 to binary. 72 = 64 + 8 = 01001000.
  3. Convert 105 to binary. 105 = 64 + 32 + 8 + 1 = 01101001.
  4. Join with spaces. Output: 01001000 01101001 (2 characters, 2 bytes, 16 bits).

An emoji or accented letter would expand: the character "e-acute" is UTF-8 bytes 195 and 169, giving 11000011 10101001, sixteen bits for one visible character. That is multi-byte UTF-8 at work.

ASCII reference: common characters

CharacterDecimal8-bit binary
(space)3200100000
04800110000
A6501000001
H7201001000
a9701100001
i10501101001
z12201111010

Common pitfalls

  • Assuming everything is one byte. Only ASCII characters are single bytes in UTF-8. Accented letters, emoji, and non-Latin scripts produce 2 to 4 bytes (16 to 32 bits), so the binary is longer than the character count suggests.
  • Dropping the leading zeros. The space character is 00100000, not 100000. Stripping leading zeros breaks the 8-bit grouping and makes the stream impossible to decode cleanly.
  • Confusing binary with Base64 or hex. Binary here means literal 1s and 0s. Base64 and hexadecimal are denser text encodings of the same bytes; they are not interchangeable with this 8-bit binary output.
  • Pasting a binary string with the wrong bit count. When decoding, the total number of bits must be a multiple of 8. Trailing spaces or a stray digit will throw off the byte boundaries.
  • Expecting whitespace to be invisible. Spaces, tabs, and newlines are real characters with their own bytes (32, 9, and 10) and will appear in the binary output.

Related tools

Frequently asked questions

How does text become binary?

Each character is first mapped to one or more bytes using an encoding (this tool uses UTF-8). Every byte is a number from 0 to 255, which is then written as 8 binary digits (bits). The capital letter A is byte 65, which is 01000001 in binary. The tool concatenates these 8-bit groups, separated by spaces for readability.

Why is each character 8 bits?

A byte is 8 bits, and ASCII and the first 128 UTF-8 code points each fit in a single byte, so a basic character maps to exactly 8 binary digits. Padding with leading zeros (padStart(8,'0')) keeps every byte the same width so the stream can be split back into characters unambiguously. Accented and non-Latin characters use 2 to 4 bytes in UTF-8, so they produce 16 to 32 bits.

What is the difference between ASCII and UTF-8 here?

For the 128 basic English characters (A to Z, digits, common punctuation) ASCII and UTF-8 produce identical single bytes. They diverge for anything beyond that: emoji, accented letters, and non-Latin scripts are single bytes in neither. UTF-8 encodes them as multi-byte sequences, so this converter handles the full Unicode range, not just plain ASCII.

Can I convert the binary back to text?

Yes. Group the bits into 8-digit bytes, convert each back to its decimal value, and decode the byte sequence as UTF-8. The companion Binary to Text Converter on 3Tej does this in one step. As long as the binary is a clean multiple of 8 bits, the round trip is lossless.

Is my text uploaded anywhere?

No. The conversion uses the browser's built-in TextEncoder API and runs entirely on your device. Nothing you type is sent to a server, logged, or stored. Closing the tab discards the input. You can confirm this by watching the Network tab in developer tools while you convert.