Text to Binary Converter

A binary translator for text and UTF-8 bytes. Encode letters, spaces, accents and emoji, or switch direction to decode binary back to text.

Binary reference chart
5 characters
Each group is one UTF-8 byte: exactly 8 bits. ASCII characters use one byte; non-ASCII characters use multiple bytes. Separate bytes with whitespace when decoding.Client-side · no upload

Text to Binary: The Answer in Bytes

This text to binary converter encodes text as space-separated groups of eight bits per byte, using UTF-8 for non-ASCII characters as well as ASCII. For example, Hello becomes 01001000 01100101 01101100 01101100 01101111 — 5 bytes.

By Hommer Zhao

Worked Examples: Outputs and Exact Errors

These results use the same conversion function as the binary translator above. Text is shown in quotes, with line feeds written as \n and tabs as \t so whitespace stays visible. Byte counts refer to encoded bytes, or the supplied bytes for a successful decode; rejected inputs have no successful result.

ASCII word: Hello

Input (Text → Binary)

"Hello"

Output

01001000 01100101 01101100 01101100 01101111

Bytes: 5

First 5 code points: H → 01001000; e → 01100101; l → 01101100; l → 01101100; o → 01101111

Why: Each ASCII letter occupies one UTF-8 byte. Uppercase and lowercase stay distinct.

Accented letter: é

Input (Text → Binary)

"é"

Output

11000011 10101001

Bytes: 2

First 1 code points: é → 11000011 10101001

Why: This letter is outside ASCII. Its UTF-8 bytes must be decoded together, not treated as separate letters.

Emoji: 😀

Input (Text → Binary)

"😀"

Output

11110000 10011111 10011000 10000000

Bytes: 4

First 1 code points: 😀 → 11110000 10011111 10011000 10000000

Why: A single emoji can occupy several bytes. Count the byte groups, not the visible symbols.

Spaces, punctuation and a newline

Input (Text → Binary)

"Hi, A!\n"

Output

01001000 01101001 00101100 00100000 01000001 00100001 00001010

Bytes: 7

First 5 code points: H → 01001000; i → 01101001; , → 00101100; SP → 00100000; A → 01000001

Why: The space, comma, exclamation mark and line feed are data and get their own bytes. The spaces between binary groups are only separators.

A letter followed by a combining accent

Input (Text → Binary)

"é"

Output

01100101 11001100 10000001

Bytes: 3

First 2 code points: e → 01100101; ́ → 11001100 10000001

Why: This is e followed by a combining acute accent. It can look like é but has a different byte sequence; the converter does not normalize the text.

Decode with tabs and newlines

Input (Binary → Text)

"\t01001000\t\n01100101\t\n01101100\t\n01101100\t\n01101111\n"

Output

"Hello"

Bytes: 5

Why: Whitespace separates bytes and does not add spaces to the decoded message. A space in the message needs its own encoded byte.

Rejected: a seven-bit group

Input (Binary → Text)

"1000001"

Error (BYTE)

Byte 1 must contain exactly eight 0s or 1s. Separate each byte with a space.

Bytes: — (rejected)

Why: Every group must contain exactly eight bits, including leading zeros. The decoder does not pad short groups.

Rejected: a digit other than 0 or 1

Input (Binary → Text)

"01000002"

Error (BYTE)

Byte 1 must contain exactly eight 0s or 1s. Separate each byte with a space.

Bytes: — (rejected)

Why: A group containing any character other than 0 or 1 is rejected, even if it has the right length.

Rejected: comma-separated bytes

Input (Binary → Text)

"01001000,01101001"

Error (BYTE)

Byte 1 must contain exactly eight 0s or 1s. Separate each byte with a space.

Bytes: — (rejected)

Why: Commas are not whitespace. Neither commas nor hyphens can separate bytes in this decoder.

Rejected: bytes without separators

Input (Binary → Text)

"0100100001101001"

Error (BYTE)

Byte 1 must contain exactly eight 0s or 1s. Separate each byte with a space.

Bytes: — (rejected)

Why: A continuous run is not automatically split into bytes. Insert whitespace between complete groups.

Rejected: an invalid UTF-8 byte

Input (Binary → Text)

"11111111"

Error (UTF8)

These bytes are not valid UTF-8. No replacement characters were inserted. Check the original encoding.

Bytes: — (rejected)

Why: Eight binary digits make a byte, but not every byte sequence is valid UTF-8. The decoder rejects this sequence without producing partial text.

Binary to English: Decode the Bytes

Select Binary → Text and paste complete byte groups in their original order. This answers “binary to English” when the bytes encode English text; decoding restores the encoded language rather than translating it. For a page focused on decoding, use Binary to Text. This binary code translator requires valid UTF-8, so a correctly sized byte group can still produce an encoding error.

Capability and Limits

  • Format: UTF-8 bytes, always eight bits per group, separated by spaces on encoding. Case, spaces, tabs, line endings and punctuation are preserved. There is no seven-bit output mode or alternate text encoding selector.
  • Input limits: 10,000 JavaScript UTF-16 code units for text; 400,000 for binary input, including separators and surrounding whitespace. Decoded text is also limited to 10,000 code units. These are string-length limits, not byte counts or visible-symbol counts: 😀 takes 2 code units.
  • Decode separators: JavaScript whitespace, including spaces, tabs and newlines. Leading and trailing whitespace is ignored. Commas, hyphens and other non-whitespace separators are rejected, as are joined byte groups.
  • Validation: every group must be exactly eight 0s or 1s, and the complete byte stream must be valid UTF-8. The decoder rejects invalid sequences without inserting replacement characters. The encoder rejects incomplete Unicode surrogate characters.
  • Browser processing: interactive conversion runs locally in JavaScript, with no conversion request or text upload. Copy result and Download TXT operate on the generated result; this widget has no file-upload input.

Common Mistakes: One Byte per Letter, and Binary as Encryption

“8 bits is for ASCII” does not mean every letter is one byte

ASCII itself fits in seven bits; this tool writes each ASCII value as an eight-bit UTF-8 byte with a leading zero. Outside ASCII, é takes 2 bytes and 😀 takes 4. Even the same-looking letter can use different bytes: precomposed é produces 11000011 10101001, while e followed by a combining acute accent produces 01100101 11001100 10000001 (3 bytes). The converter preserves the input code points; it does not normalize one spelling into the other.

To read one byte, keep the bits in order and assign powers of two from the rightmost bit, starting at 20. For H, the codec returns 01001000:

0 × 2^7 + 1 × 2^6 + 0 × 2^5 + 0 × 2^4 + 1 × 2^3 + 0 × 2^2 + 0 × 2^1 + 0 × 2^0
= 0 × 128 + 1 × 64 + 0 × 32 + 0 × 16 + 1 × 8 + 0 × 4 + 0 × 2 + 0 × 1
= 64 + 8 = 72

That value identifies H in ASCII. For a non-ASCII character, UTF-8 decoding must interpret its bytes together; looking up each byte as an independent letter gives the wrong result. See A1Z26 vs ASCII vs binary for the distinction between alphabet positions, character codes and binary notation.

Binary is not encryption

This binary converter changes how text is represented, without a secret key. Anyone can decode the bytes with the same UTF-8 rules, so encoding a message as zeros and ones does not keep it confidential.

Small ASCII Reference

These printable ASCII characters each occupy one UTF-8 byte. For the full reference, open the ASCII table; use the ASCII converter for decimal codes or the hex converter for hexadecimal notation.

CharacterASCII decimalUTF-8 binary byte
A6501000001
B6601000010
Z9001011010
a9701100001
04800110000
Space3200100000

Frequently Asked Questions

It encodes text as UTF-8 bytes written in binary, with eight bits per byte and spaces between bytes. Hello becomes 01001000 01100101 01101100 01101100 01101111 (5 bytes). Switch to Binary → Text to decode valid UTF-8 byte groups back to text.
Encode the text as UTF-8, then write each byte in base 2 with leading zeros to make eight bits. ASCII covers values 0–127 and fits in seven bits; this tool displays those values as eight-bit bytes with a leading zero. Non-ASCII text uses multiple UTF-8 bytes per Unicode code point, not a single ASCII value.