Binary, Hex & Decimal Converter
Convert numbers between binary, octal, decimal and hexadecimal in one step.
- Free
- Instant result
- Private · on-device
- No sign-up
How to use: Type a number in one base (binary, octal, decimal or hex) and see it in the others.
- The boxes start with sensible numbers. Change any you need.
- The result sits under the form.
- Copy the answer if you want to keep it.
How to use the Binary, Hex & Decimal Converter
Computers store everything as binary digits, but people prefer decimal, and programmers often meet hexadecimal and octal as compact ways to write binary values. This tool translates between all of them instantly.
Type a number, choose the base it is written in, and the table shows the same value in binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), base 32 and base 36. Prefixes such as 0x, 0b and 0o are accepted, and spaces and underscores are ignored so you can paste grouped values like 1111_0000.
Each base has its own digits. Binary uses 0 and 1, octal uses 0 to 7, and hexadecimal uses 0 to 9 plus the letters A to F for ten to fifteen. If you type a digit that does not exist in the chosen base, such as 2 in binary, the tool points out the problem. Conversion is done with big integers, so values with dozens of digits stay exact, which ordinary calculators cannot do.
A handy fact: one hexadecimal digit represents exactly four bits, so the byte 11111111 is simply FF, and 255 in decimal. That relationship is why hex is used for memory addresses, color codes and network settings. The tool works with whole numbers only, including negatives.
How to convert binary to decimal
Binary is base 2, so each digit is a 0 or a 1 and each place is a power of 2, starting at 20 = 1 on the right.
- Write the binary number. A leading zero, as in 01101, does not change the value.
- Under each digit, write the place value. For a five-digit number those places are 16, 8, 4, 2 and 1.
- Multiply each digit by its place value.
- Add those products. The sum is the decimal number.
Worked example: convert 01101 to decimal
The bits of 01101 and their place values, from left to right, are:
| Bit | 0 | 1 | 1 | 0 | 1 |
|---|---|---|---|---|---|
| Place value | 16 | 8 | 4 | 2 | 1 |
| Bit × place | 0 | 8 | 4 | 0 | 1 |
Add the products: 0 + 8 + 4 + 0 + 1 = 13. 01101 in binary is 13 in decimal. Dropping the leading zero leaves 1101, which is also 13. You can confirm this in the converter above by choosing binary as the input base and typing 01101.
Another short check: 1011 is (1 × 8) + (0 × 4) + (1 × 2) + (1 × 1) = 11.
Last reviewed November 16, 2026. The examples use this converter’s own method.
Frequently asked questions
How do I convert binary to decimal?
Multiply each digit by 2 raised to its position, counting from zero on the right, and add the results. For 01101 that is (0 × 16) + (1 × 8) + (1 × 4) + (0 × 2) + (1 × 1) = 13. For 1011 it is 8 + 0 + 2 + 1 = 11.
How do you convert 01101 to decimal?
01101 in binary is 13 in decimal. From the left, the place values are 16, 8, 4, 2 and 1, so 0 + 8 + 4 + 0 + 1 = 13. The leading zero does not change the value.
Why is hexadecimal used?
It is a compact way to write binary: each hex digit equals four bits.
Does it handle huge numbers?
Yes. It uses arbitrary-precision integers, so very long values convert exactly.