To convert text to binary, encode the text as UTF-8 and write each resulting byte as exactly eight zero-padded binary digits separated by one space.

Most importantly, this is a byte representation rather than one fixed binary number for every visible character. The Text to Binary Converter converts Unicode text into spaced UTF-8 byte groups and decodes binary that follows the same strict format. Its input and output stay in the current tab and are not sent to Lizely.

convert text to binary
Convert Text to Binary: Copy and Verify UTF-8 Bytes

What each binary group means

UTF-8 is a variable-width encoding. ASCII characters use one byte, while many accented letters, CJK characters, symbols, and emoji use two to four bytes. The number of groups in the output therefore represents the encoded byte count, which may differ from the number of characters entered. Each group still occupies exactly eight binary positions, including any leading zeros.

The result is the base-2 representation of a UTF-8 byte sequence. It is not a list of Unicode code points, JavaScript UTF-16 code units, glyph pixels, or a base-2 rendering of each Unicode scalar value. The browser’s standards-based TextEncoder performs the encoding before the bytes are written in eight-digit groups.

Representation What one item represents Best suited to
UTF-8 binary bytes One byte written as eight binary digits Inspecting exact UTF-8 bytes in visible 0-and-1 notation
Unicode code points One Unicode code point Identifying character values independently of byte length
UTF-16 code units One 16-bit code unit Understanding JavaScript string units and lengths
Hexadecimal One byte written as two hexadecimal digits Byte-oriented fields that specifically require hex
Base64 Base64 characters carrying encoded data Moving encoded data through a text-only channel

This table distinguishes representations; it is not a list of formats accepted by the converter. The tool handles Unicode text in one direction and strict binary byte groups in the other. It does not reinterpret code points, hexadecimal, or Base64 as binary input.

Convert text to binary in three steps

  1. Choose Text to UTF-8 binary. Select the reverse direction only when you already have binary byte groups.
  2. Enter or paste the Unicode text. The converter encodes it with the browser’s standards-based TextEncoder and prints every byte as eight zero-padded bits separated by one ordinary space.
  3. Select Convert, verify the reported byte count, and inspect the resulting groups before copying them elsewhere.

For ASCII-only text, each character contributes one byte. Other characters can contribute several bytes, so the reported byte count may be greater than the visible-character count. You can also check the result by counting its eight-digit groups, with one space between adjacent groups.

Encoding accepts up to 20,000 UTF-16 code units. That is a code-unit budget, not a byte total and not necessarily the same as a visible-character count. If the input is over the limit, shorten or split it before converting. The decoding budget is separate: the reverse mode accepts up to 180,000 serialized input characters, so check the length of the copied binary when planning a round trip.

Work through one conversion

Use this rule: one output group equals one UTF-8 byte value written as eight base-2 digits.

  1. For the letter H, the UTF-8 byte value is decimal 72, or 0x48. Written in eight binary positions, it is 01001000.
  2. For the letter i, the UTF-8 byte value is decimal 105, or 0x69. Written in eight binary positions, it is 01101001.
  3. Joining the two groups with one ordinary space produces 01001000 01101001.

The final output represents 2 bytes, or 2 bytes × 8 bits per byte = 16 binary digits. The input happened to contain two characters and two bytes because both characters are ASCII. With wider UTF-8 characters, the same process creates more groups and the byte count no longer matches the character count.

Decode the output with strict validation

Choose UTF-8 binary to text and paste the groups into the input. The accepted serialized pattern is [01]{8}( [01]{8})*: binary digits grouped into exact eight-bit bytes, with exactly one ordinary space between adjacent groups.

  • Every group must contain exactly eight characters, and each character must be 0 or 1.
  • Adjacent groups must have one ordinary space between them, not a tab, comma, multiple spaces, or other separator.
  • Leading and trailing whitespace are rejected.
  • Prefixes such as 0b, seven-bit groups, and nine-bit groups are rejected.
  • Any character other than 0 or 1, apart from the required spaces, is rejected.

Passing the grouping rules is only the first validation stage. The resulting bytes must also form valid UTF-8. A byte sequence can be perfectly divided into eight-bit groups and still be invalid text, such as a lone leading byte without its required continuation. Invalid, overlong, surrogate, and out-of-range sequences fail with a clear error. The fatal decoder does not replace malformed bytes with the Unicode replacement character, and decoding values are never padded, trimmed, guessed, or silently discarded.

This strict behavior differs from the encoder’s deliberate zero-padding: the encoder formats each byte as exactly eight digits, while the decoder refuses to repair an undersized group. The fatal TextDecoder option is used so malformed UTF-8 cannot pass unnoticed during verification.

Preserve the result when copying it

Binary looks like ordinary text because its zeros, ones, and spaces are display characters. That makes it easy for the next application to alter its format unintentionally.

  • Use a plain-text field or editor that preserves ordinary spaces and line content exactly.
  • Avoid transformations that normalize whitespace. Chat clients and rich-text editors may collapse spaces, trim them, or insert line breaks.
  • Keep group order and width intact. Do not remove leading zeros or manually insert separators.
  • Decode the copied result when possible. Confirm that the decoded text matches the original instead of assuming a visually similar display is byte-identical.

For protocol, source-code, or forensic work, verify the actual byte sequence against the relevant specification and the destination system. A font’s rendering cannot prove that every space survived the copy. If the destination changes the output, reconvert the original text rather than trying to repair an ambiguous binary transcript by eye.

Choose binary for the right job

Text-to-binary conversion is an encoding operation, not encryption. The output contains the same information as the original text. It provides no secrecy, authentication, integrity, compression, or password protection, and anyone can decode it once they know the encoding and grouping rules.

The converter is intended for Unicode text and strict UTF-8 byte groups. It does not parse numeric binary values, machine instructions, files, images, Base64, hexadecimal, Morse code, or custom legacy character sets. Those are different formats with different purposes, so use the appropriate neighboring tool when one of them is the real goal. In particular, Unicode code points describe characters, while UTF-8 binary describes the bytes used to store them.

Use visible binary when you need to teach byte structure, inspect a UTF-8 sequence, or supply an exact 0-and-1 representation required by a documented workflow. Name UTF-8 and the eight-bit grouping rule whenever sharing the result, because binary text is otherwise ambiguous. A dependable result comes from encoding with UTF-8, checking the byte count, preserving the one-space groups, and decoding only when the copied format still passes strict validation.

For a deeper look, see Do Text-to-Hex Output Formats Change UTF-8 Bytes?.

For a deeper look, see Convert Text Files to UTF-8 in Your Browser.