Skip to content
🧩

Binary Decoder

Decode binary, octal, hex, or decimal values to text and ASCII.

Runs in your browser

Updated

Turning groups of numbers back into text

This decoder reads a run of numeric tokens and maps each one to a single character. Two dropdowns steer it: Input Type chooses a radix among Binary, Octal, Decimal and Hexadecimal, while Delimiter says whether tokens are split by space, comma or newline. Type values into the lower box and press Decode; a read-only result box fills in underneath, with its own Copy button.

A worked example

Leave Input Type on Binary and Delimiter on Space, then enter 01001000 01101001. Both tokens parse base 2 into 72 and 105, which are the ASCII codes for H and i, so the output reads Hi. Rerun the same characters with Input Type on Decimal and you instead get gibberish, because the digit strings mean something different in base 10.

The rules the code follows

Conversion calls the browser parseInt against the chosen radix, and a token becomes a character only when the number is finite and lands between 0 and 255 inclusive. Anything outside that window, or a token the radix cannot read, is written as a question mark instead of being dropped, so one bad byte still shows as a visible placeholder. Short groups are accepted, which is why 101 decodes to 5 rather than erroring. When you only need the radix change and not the character, the number base converter handles that, and text to binary runs this mapping in reverse.

Where it stops

  • The range ends at 255, so multi-byte UTF-8 and anything above Latin-1 arrive as question marks.
  • There is no radix guessing; the wrong base silently produces the wrong letters.
  • A missing separator merges two bytes into one oversized token.
  • Decoding happens on the button press only, never live as you type.

Questions people ask

Why do I see question marks?

Either the value exceeds 255 or the radix cannot parse it; check that the base matches the source.

Does it understand hex prefixes?

No. Write plain groups such as 48 65; a leading 0x collapses to zero and prints a stray character.