Skip to content

Binary to Text Converter

Embed

Paste this where you want Binary to Text Converter on your site. Adjust the height to fit.

<iframe src="https://www.browserutils.dev/embed/binary-to-text/" width="100%" height="500" frameborder="0" loading="lazy" title="Binary to Text Converter"></iframe>
<p style="font-size:12px;margin:4px 0 0"><a href="https://www.browserutils.dev/tools/binary-to-text/">Binary to Text Converter</a> by BrowserUtils</p>

Convert between binary and text.Runs in this tab.

Next step

About Binary to Text Converter

How text becomes 8-bit groups

The encoder runs your text through UTF-8 (the browser’s TextEncoder), then writes each byte as exactly eight binary digits, zero-padded on the left and separated by a single space. ASCII characters are one byte each, so “Hi” becomes two groups:

Hi  →  01001000 01101001

A few values worth recognizing:

Char Decimal Hex Binary
A 65 0x41 01000001
Z 90 0x5A 01011010
a 97 0x61 01100001
z 122 0x7A 01111010
0 48 0x30 00110000
9 57 0x39 00111001
space 32 0x20 00100000
newline 10 0x0A 00001010

Two patterns fall out of the table. Upper- and lowercase letters differ only in the third bit from the left (value 32), so flipping that one bit toggles case. Digits are 0011 followed by the digit’s own 4-bit value. Line breaks in your input are encoded too, so a trailing newline adds 00001010 to the end of the output.

ASCII vs UTF-8: why some characters take 16, 24 or 32 bits

Anything outside ASCII becomes several bytes. The first byte’s leading bits tell a decoder how many bytes belong to the character: 110 starts a 2-byte sequence, 1110 a 3-byte one, 11110 a 4-byte one, and every continuation byte starts with 10.

é   →  11000011 10101001
€   →  11100010 10000010 10101100
😀  →  11110000 10011111 10011000 10000000

So “café” is five groups, not four. This is the usual reason two converters disagree: a tool that assumes Latin-1 (or Windows-1252) encodes é as the single byte 11101001. Paste that lone byte here and you get �, because this decoder always reads UTF-8, and 11101001 on its own is not a complete UTF-8 sequence. To see the code point and byte layout of each character separately, use the UTF-8 byte viewer.

What the decoder accepts, and what it does with bad input

Knowing the parsing rules saves debugging time:

  • Any character other than 0 and 1 is a separator. Spaces, commas, tabs and line breaks all work, so 01001000,01101001 and one-byte-per-line input both decode to “Hi”.
  • Leading zeros are optional. 1001000 1101001 (7-bit groups) also gives “Hi”, because each group is read as a number.
  • You need separators between bytes. Without them the whole run is read as one number and only its lowest 8 bits survive, so 0100100001101001 decodes to just i. Split long strings into 8-digit groups first (see the one-liners below).
  • Strip 0b prefixes. The b acts as a separator, so the leading 0 becomes its own group: 0b01001000 decodes to a NUL byte followed by “H”.
  • Groups longer than 8 digits wrap. Only the low 8 bits are kept: 101000001 (decimal 321) decodes as A.
  • Broken or truncated UTF-8 doesn’t raise an error. An incomplete multi-byte sequence becomes the replacement character U+FFFD (�) and the rest of the text still decodes. The only error is input with no 0s or 1s at all.
  • A dropped digit fails silently. 01001000 0110100 1 decodes to “H4” plus a control character, not “Hi”. If the output looks wrong, check that the total digit count is a multiple of 8.

Command-line and code equivalents

# Text → binary (offset, bits, then the printable-ASCII column)
printf 'Hi' | xxd -b
# 00000000: 01001000 01101001                                      Hi

# Binary with no spaces → text
echo 0100100001101001 | perl -lpe '$_=pack"B*",$_'

# Insert a space every 8 bits so this tool can read it
echo 0100100001101001 | sed 's/.\{8\}/& /g'
' '.join(f'{b:08b}' for b in 'café'.encode())
bytes(int(b, 2) for b in '01001000 01101001'.split()).decode()
[...new TextEncoder().encode('Hi')].map(b => b.toString(2).padStart(8, '0')).join(' ')
new TextDecoder().decode(new Uint8Array('01001000 01101001'.split(' ').map(b => parseInt(b, 2))))

Python’s .decode() raises UnicodeDecodeError on an incomplete sequence; pass errors='replace' to get the same � behavior as this tool. JavaScript’s TextDecoder replaces by default, which is what runs here.

“Binary-to-text encoding” usually means Base64 or hex

If you searched for binary-to-text encoding because you need to put a file, hash or key into JSON, a URL or an email, you want a different tool. In that sense (as in RFC 4648), the term covers schemes that represent arbitrary bytes with printable characters, and base-2 is the least compact option:

Encoding Output chars per byte Hi! encoded
Binary (this tool) 8, plus a separator 01001000 01101001 00100001
Hex 2 486921
Base64 about 1.33 SGkh

Use the hex to text converter for hex dumps and the Base64 encoder/decoder for data you need to embed or transmit. Binary is the right view when you care about individual bits: flags, masks, or how UTF-8 lays out a character.

Questions

How does binary-to-text conversion work?
Each character is represented by its 8-bit binary value (e.g., the letter A is 01000001). This tool converts between those binary representations and readable text.
What binary format is used?
This tool uses 8-bit binary representations separated by spaces. Each group of 8 bits represents one ASCII/UTF-8 character.
Can I convert binary back to text?
Yes, paste a space-separated string of 8-bit binary groups and the tool will decode each group back to its corresponding character.
Why do computers use binary?
Computers use binary because digital circuits have two states: on (1) and off (0). All data, from text to images to programs, is ultimately stored and processed as sequences of binary digits.
Is the binary converter safe for private data?
Yes, all conversion happens in your browser. No data is transmitted to any server.
How do I convert binary to decimal?
This tool converts binary to text characters. For binary-to-decimal number conversion, read each 8-bit group as a base-2 number: for example, 01000001 equals 65 in decimal, which is the ASCII code for "A".

More in Encoding & Decoding

All 20 encoding & decoding