Compare the bits 01001011 across number bases. They represent decimal 75, hex 4B, and octal 113.
What is Binary Converter?
A sequence of bits can describe a number or carry characters. Choose the output according to what the source bytes mean. For instance, 01010011 represents 83 as a number and S as an ASCII character.
How to use Binary Converter
- Select the source and target formats.
- Enter the input and check the result and any working shown for the first value.
- Copy the output, or switch directions if you need to verify the round trip.
Key features
- Convert binary to decimal, hex, octal and text
- Convert decimal, hex, octal or text back to binary
- Every base shown at once for a single value
- Step-by-step working: place values into decimal, division by 2 out of decimal, and bit groups for hex and octal
- Optional 8-bit byte padding
- Exact results for numbers of any size
Common use cases
- Checking homework and exam answers against the full working
- Reading bit flags, masks and register values
- Converting IP address octets and subnet masks
- Decoding binary-encoded text
- Moving between binary and hex while debugging
Technical details & standards
Binary uses only the digits 0 and 1, and each position is worth twice the one to its right: 1101 is 8 + 4 + 0 + 1 = 13. Eight bits make a byte, which holds 0 to 255, and every group of four bits is one hex digit, which is why binary converts to hex so directly.
Worked example: 11010001 is 128 + 64 + 16 + 1 = 209 in decimal. Split into groups of four, 1101 0001 is D1 in hex; split into groups of three from the right, 011 010 001 is 321 in octal. The converter lists this working for the first value whenever you convert binary to decimal, hex or octal.
Numbers are converted with JavaScript BigInt, so long bit strings stay exact, and binary output can be padded to whole 8-bit bytes. Text conversions read each 8-bit group as one byte, so 01001000 01101001 decodes to Hi. Everything runs in your browser; nothing is uploaded.
Binary, hex and decimal values
Every binary number is built from the sixteen 4-bit patterns below, and each pattern is exactly one hex digit, so a byte always reads as two hex digits. The second table shows the landmark values around a single byte.
The sixteen 4-bit patterns
| Binary | Hex | Decimal |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
Values around one byte
| Binary | Hex | Decimal | Where you see it |
|---|---|---|---|
| 0001 0000 | 0x10 | 16 | The first value that needs a fifth bit |
| 1000 0000 | 0x80 | 128 | Only the top bit of a byte is on |
| 1111 1111 | 0xFF | 255 | Eight 1s, the most a byte can store |
| 0001 0000 0000 | 0x100 | 256 | Needs a ninth bit, so it no longer fits in a byte |
Frequently asked questions
When should I choose Text as the output?
Use Text for bit groups that carry character bytes. Use a number base for quantities, addresses, and masks.
What can this binary converter convert?
Binary to decimal, hex, octal and text, and each of those back to binary. Choose the two formats in the menus at the top.
How do I convert from binary?
Leave the first menu on Binary, pick Decimal, Hex, Octal or ASCII Text in the second, and paste your bits. 11010001 becomes 209 in decimal, D1 in hex and 321 in octal, and the bytes 01001000 01101001 become the text Hi.
Can it show a binary value in every base at once?
Yes. Enter a single binary value and a summary lists it in binary, octal, decimal and hex, plus its ASCII character when the value is a printable code from 32 to 126. 1000001, for example, shows 101 in octal, 65 in decimal, 0x41 and the letter A.
Can I use it as a binary to hex converter?
Yes. Choose Binary and Hex in the menus. Each group of four bits becomes one hex digit, so 1101 0001 is D1 and 11111111 is FF, and the working lists every group. Tick Include 0x Prefix to get 0xD1.
Does it show the working for binary to decimal conversion?
Yes. Like a binary to decimal conversion calculator with the steps written out, it multiplies each bit by its power of 2 and adds the results. For 11010001 the steps run from 1 × 2⁷ = 128 down to 1 × 2⁰ = 1, ending in 128 + 64 + 16 + 1 = 209.
Should binary be written in groups of 8?
Not for numbers: 1010 and 00001010 are both 10. For text, each character is one 8-bit byte, so separate the bytes with spaces or keep the bits in multiples of 8.
Can I convert several binary numbers at once?
Yes. Separate them with spaces or commas and each one is converted. The step-by-step working is shown for the first number.
Does it work with negative numbers?
A leading minus sign is kept, so -1010 converts to -10. Two's complement values are read as unsigned numbers: 11111111 gives 255, not -1.
Can I decode binary to text?
Yes. Set Convert from to Binary and Convert to to ASCII Text, then paste 8-bit groups: 01001000 01101001 decodes to Hi. For decoding whole messages, the Binary to Text converter is built for that job and explains garbled output.
Can I use it as a number to binary converter?
Yes. Set Convert from to Decimal and Convert to to Binary, then type one or more numbers separated by spaces or commas: 10 becomes 00001010 and 255 becomes 11111111. Results are padded to whole 8-bit bytes by default; untick 8-Bit Byte Padding to get the shortest form, such as 1010.
Can it convert binary to BCD or Gray code?
No, those are different encodings, but both are quick by hand. BCD writes each decimal digit in four bits: convert 11010001 to decimal here (209), then write 2, 0 and 9 as 0010 0000 1001. Gray code keeps the first bit and XORs each later bit with the bit before it, so 1101 becomes 1011.
Can it add or multiply binary numbers?
No, this page converts between number systems and does no arithmetic. To add, subtract, multiply or combine numbers with AND, OR and shifts, use the Programmer Calculator: type the expression in decimal, such as 12 + 7, and read the result in its binary output.