Free browser-based binary decoder
Binary to ASCII Converter
Turn 7-bit or 8-bit binary groups into readable ASCII text. Use UTF-8 mode when the binary represents multilingual text, symbols, or emoji.
Interactive tool
Decode binary code into text
Ready
ASCII accepts separated 7-bit or 8-bit groups and compact streams. UTF-8 requires complete 8-bit bytes. Spaces, commas, line breaks, colons, hyphens, and 0b prefixes are accepted.
Conversion guide
How Binary to ASCII Conversion Works
Each ASCII character has a number from 0 to 127. Read each binary group as a base-2 number, then map that number to the ASCII table. Binary 01001000 is decimal 72, which represents H.
The input 01001000 01101001 therefore becomes Hi. Standard ASCII is a 7-bit code, but it is commonly stored as an 8-bit byte with a leading zero. This tool accepts both forms in ASCII mode.
| Binary | Decimal | ASCII character |
|---|---|---|
00100000 | 32 | Space |
00110000 | 48 | 0 |
01000001 | 65 | A |
01001000 | 72 | H |
01100001 | 97 | a |
01111010 | 122 | z |
Binary to ASCII in JavaScript
For separated ASCII groups, validate seven or eight binary digits, convert each group with parseInt(bits, 2), reject values above 127, and build the text with String.fromCharCode.
function binaryToAscii(binary) {
return binary.trim().split(/[\s,]+/).map((bits) => {
if (!/^[01]{7,8}$/.test(bits)) throw new Error("Invalid binary group");
const value = parseInt(bits, 2);
if (value > 127) throw new Error("Not standard ASCII");
return String.fromCharCode(value);
}).join("");
}
binaryToAscii("01001000 01101001"); // Hi
Binary to ASCII in Python
Python can convert each group with int(bits, 2). For UTF-8, collect complete 8-bit values in a bytes object and call decode("utf-8") so multibyte sequences are handled together.
ascii_text = "".join(chr(int(bits, 2)) for bits in
"01001000 01101001".split())
utf8_bytes = bytes(int(bits, 2) for bits in
"11100100 10111101 10100000".split())
print(ascii_text) # Hi
print(utf8_bytes.decode("utf-8")) # 你
7-bit ASCII, 8-bit Bytes, and UTF-8
Standard ASCII defines 128 values, so seven bits are enough. In byte-oriented systems, ASCII normally uses eight bits with the high bit set to zero: 1000001 and 01000001 both represent A.
An 8-bit value from 10000000 through 11111111 is not standard ASCII by itself. It may be part of UTF-8 or a legacy encoding. Choose UTF-8 text only when every input group is a full 8-bit byte from a UTF-8 byte stream.
The byte boundaries and source encoding must be known before values above 127 can be decoded correctly.
Invalid Binary and Incomplete Groups
Binary input may contain only 0 and 1 after optional 0b prefixes. ASCII groups must contain seven or eight bits; UTF-8 groups must contain exactly eight. A compact stream must divide evenly into the selected group width.
The converter rejects incomplete groups instead of padding or dropping bits. In ASCII mode, values above 127 appear as ? with a warning. In UTF-8 mode, malformed byte sequences use � and trigger a separate warning.