Binary to Decimal Converter
Type a binary number and read it in decimal.
Runs entirely in your browser
Loading the tool…
| Decimal | — |
|---|---|
| Hexadecimal | — |
| Octal | — |
| Binary | — |
| Base 32 | — |
| Base 36 | — |
- —Bits
- —Bytes
- —Fits in
- —Parity
Any base from 2 to 36
Type a binary number and read the decimal. The box opens on eight ones, which is 255: a full byte.
Each position is a power of two, doubling from the right: 1, 2, 4, 8, 16 and on. Converting by hand is just adding up the positions with a one in them, which is why a run of ones is always one less than the next power of two. Eight ones is 256 minus 1, sixteen ones is 65,536 minus 1, and recognising that saves more arithmetic than any other fact about binary.
Leading zeros change nothing about the value and everything about the width, which is usually why they are written. The bits and bytes figures below the conversions report the width, and that is generally the number being looked for when somebody converts a binary literal.
Hex is converted at the same time, and is the more useful reading for anything longer than a byte, since four bits map to one hex digit exactly. There is also hex to decimal and decimal to hex.
How to use it
- Read the row you came for. Every base is converted at once.
- Type your own number into the box, which converts as you type.
- Use the custom base field for anything from 2 to 36.
Questions
What is 11111111 in decimal?
255. Eight ones is one less than 2 to the eighth, which is 256, and that is the largest value an unsigned byte holds. The same shortcut works at any width: a run of n ones is 2 to the n, minus one.
Do leading zeros matter in binary?
Not to the value. 0011 and 11 are both three. They matter to the width, which is why binary is usually padded to eight, sixteen or thirty-two digits when it is being read as a byte or a register rather than as a plain number.
Does it handle negative numbers and very large ones?
Negative numbers yes. Size is bounded by what the conversion can represent exactly, and a value beyond that is refused rather than silently rounded, since a base conversion that quietly loses the low digits is worse than no answer.
Is anything sent anywhere?
No. The conversion runs in WebAssembly in this tab and the page makes no request of its own, so it works with the network off and nothing you type is recorded.
Other conversions
The same converter opened on a different base. Every base is shown on each of them.
Your data stays on your device
Everything above runs inside your browser as WebAssembly compiled from Rust. Nothing you type is uploaded, logged or stored on a server. You can load this page once, go offline, and it still works.
This page makes no requests at all, to anywhere. That is not a promise in the copy: it is a Content-Security-Policy header your browser enforces, and connect-src on it is none. Open the network tab and watch nothing happen.