Binary Text Converter

Convert text to and from 8-bit binary 01010100 01100101…

Encodes text as space-separated 8-bit binary using its UTF-8 byte values, and decodes a binary string back to readable text. Handles multibyte characters and emoji correctly. Runs entirely in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How is each character turned into binary?

The text is first encoded as UTF-8 bytes. Each byte (0 to 255) is then written as an 8-bit binary string, zero-padded on the left. A capital A is byte 65, which is 01000001.

This converter translates between human text and 8-bit binary. Encoding turns each UTF-8 byte of your text into a zero-padded group of eight bits; decoding reads such groups back into the original characters.

How it works

For encoding, the text is converted to UTF-8 bytes (via TextEncoder). Each byte is a number from 0 to 255, written as eight binary digits:

byte 65 (A) -> 01000001
byte 32 ( ) -> 00100000

For decoding, all whitespace is removed and the remaining 0 and 1 characters are split into groups of eight. Each group is parsed as a byte and the resulting byte array is decoded as UTF-8 back into text.

ASCII vs. multibyte characters — what changes the output length

For plain English letters, digits, and common punctuation (characters in the ASCII range, 0–127), each character maps to exactly one byte and therefore one 8-bit group. The letter A is always 01000001. The digit 7 is always 00110111.

Characters outside the ASCII range — accented letters like é, Cyrillic, Arabic, CJK ideographs, and emoji — require more than one UTF-8 byte. The exact byte count depends on the Unicode code point:

CharacterCode pointUTF-8 bytesBinary groups
AU+0041101000001
éU+00E9211000011 10101001
U+20AC3three 8-bit groups
emoji (e.g. ✓)U+2713+3–4three or four groups

This is why converting an emoji to binary produces 24 or 32 bits, not 8.

Worked example: encoding “Hi!”

The three characters in Hi! are ASCII, so each maps to one byte:

  • H = 72 = 01001000
  • i = 105 = 01101001
  • ! = 33 = 00100001

Encoded result: 01001000 01101001 00100001

To verify: paste that string into the decoder and it returns Hi! exactly.

Decoding: what the tool checks

When you paste a binary string to decode, the tool:

  1. Strips all whitespace (spaces, newlines, tabs are ignored)
  2. Verifies that only 0 and 1 characters remain
  3. Checks that the total bit count is a multiple of 8
  4. Splits into 8-bit groups and converts each to a byte value
  5. Passes the byte array through TextDecoder using UTF-8

If any character other than 0 or 1 appears, or the bit count is not divisible by 8, the tool reports the specific problem rather than silently producing garbled output. This matters because dropping a bit from the middle of a multibyte sequence produces a completely different character — the error check prevents that.

Common uses

  • CS education: visualising how characters are stored in memory, understanding character encoding
  • Debugging encoding issues: checking the exact byte representation of an unusual character to confirm it is what you expect
  • Puzzles and CTF challenges: binary-encoded messages are common in capture-the-flag competitions
  • Data inspection: any situation where you need to see the raw byte pattern behind a string

The round trip is lossless — encoding then decoding returns the original text exactly, including spaces, punctuation, and Unicode characters — because UTF-8 is a reversible encoding.