Formats the binary decoder reads
A binary decoder turns encoded bytes back into readable text. Bytes can be written in several number systems, and this decoder reads all the common ones. Here is the same text, “Hi!”, in each format:
| Format | Base | Encoded |
|---|---|---|
| Binary | Base 2 | 01001000 01101001 00100001 |
| Octal | Base 8 | 110 151 041 |
| Decimal | Base 10 | 72 105 33 |
| Hexadecimal | Base 16 | 48 69 21 |
| Base64 | 64 characters | SGkh |
Binary, octal, decimal and hex all write one number per byte; they only differ in the base. Hex is the most compact of the four, two digits per byte. Base64 works differently: it packs every three bytes into four characters, which makes it shorter still and safe to paste into email, URLs and JSON.
How auto-detect works
With Read as set to Auto-detect, the decoder looks at what you pasted and picks the first format that fits, in this order:
- Binary if every group contains only 0s and 1s.
- Hex if the groups use hex digits and also have a
0xprefix, a letter A–F, exactly two digits each, or form one long even-length run. - Decimal if every group is a number from 0 to 255.
- Base64 if the input uses only Base64 characters and its length fits Base64, or it ends in
=.
The line above the input tells you which format was chosen. Some inputs are genuinely ambiguous: 48 69 is valid hex and valid decimal. Auto-detect picks hex, because hex bytes are always two digits. If that’s wrong, pick the format yourself in Read as. Octal is never auto-detected, since octal bytes also look like decimal, so choose Octal manually.
Where you’ll find encoded text
- Puzzles and CTF challenges often layer encodings, for example Base64 that decodes to hex that decodes to text. Decode, swap, and decode again.
- Network and file dumps show bytes in hex. Paste a run of hex to see whether it contains readable text.
- Email, URLs and APIs carry text and attachments as Base64, including the URL-safe variant with
-and_, which the decoder accepts. - Source code writes bytes as
0x48or0b01001000. Both prefixes are understood.
Decoding tips
- If the result is unreadable or shows �, the bytes may not be text: they could be an image, compressed data or encrypted.
- Use the swap button to re-encode a result and compare it with your input. It keeps the same base; Base64 input is re-encoded as binary.
- Only have binary? The binary to text translator is tuned for that, including 7-bit groups.
Frequently asked questions
How does the decoder know which format I pasted?
Auto-detect checks the input in order: only 0s and 1s is binary; hex digits, 0x prefixes or two-digit groups are hex; numbers up to 255 are decimal; otherwise Base64. You can always choose the format yourself.
Is "48 69" hex or decimal?
It could be either. Auto-detect reads two-digit groups as hex, which gives "Hi". If you meant decimal, set Read as to Decimal and you get the characters 0 and E instead.
What is Base64?
Base64 writes bytes using 64 safe characters (A–Z, a–z, 0–9, + and /), so binary data can travel through email or URLs. "Hi" in Base64 is SGk=.
Can it decode binary that isn’t text?
It decodes the bytes, but if they are an image, a file or encrypted data, the result won’t be readable and you’ll see a warning about invalid UTF-8.