Binary to decimal
Every base from 2 to 36, in both directions — and a table showing how the answer was reached, not just the answer.
Type a value above and it appears in every base below.
The sum of that bottom row is the answer.
Binary to decimal, the long way round
A binary number is read exactly like a decimal one, except each column is worth twice the column to its right instead of ten times. The rightmost digit is worth 1, then 2, 4, 8, 16, and so on. To convert, write the place value above each digit, keep the ones, throw away the zeros, and add up what is left.
Take 11010110. The columns, from the left, are worth 128, 64, 32, 16, 8, 4, 2 and 1. The digits that are 1 sit in the 128, 64, 16, 4 and 2 columns, so the answer is 128 + 64 + 16 + 4 + 2 = 214. The table on this page does that expansion for whatever you type, which is a good deal more useful for learning it than a number appearing in a box.
Going the other way, from decimal to binary, is repeated halving: divide by 2, write down the remainder, repeat with the quotient until you reach zero, then read the remainders from the bottom up. Switch the base selector to decimal and the page shows those steps too.
Denary, base 2, and the words people use
British school syllabuses call base 10 denary rather than decimal; they mean the same thing, and the word exists mainly to avoid confusion with the decimal point. Base 8 is octal, base 16 is hexadecimal, usually shortened to hex. Hex matters because one hex digit is exactly four binary digits, so any binary number splits neatly into hex nibbles — which is why memory dumps, colour codes and MAC addresses are all written in hex rather than in eighty characters of ones and zeros.
Numbers bigger than a double can hold
Most online converters run your input through the browser's ordinary number type, which is a 64-bit float. That is fine up to 9,007,199,254,740,991 and silently wrong above it: paste a 64-bit hardware ID or a snowflake ID and the last few digits come back changed. This page uses arbitrary-precision integers throughout, so a 200-digit binary number converts exactly.
Fractions are exact too, and for the same reason they are kept as a ratio rather than a float. Binary 0.1 is decimal 0.5 precisely; binary 0.0001100110011… is the reason decimal 0.1 cannot be stored exactly in a computer, and you can watch that happen by converting 0.1 from decimal to binary and seeing the pattern repeat until the display runs out of room.
Negative numbers and two's complement
Computers do not store a minus sign. A negative integer in an 8, 16, 32 or 64-bit register is stored as two's complement: take the positive value, subtract it from 2n, and keep the bottom n bits. In eight bits, −1 is 11111111 and −128 is 10000000. The top bit ends up acting as a sign bit, but it is not a sign bit — it is just the highest place value, which is what makes addition work without any special cases.
Pick a width from the selector and the two's complement pattern appears alongside the plain conversion, along with a warning when your number does not fit. That last part matters: −129 in eight bits is not an error the hardware reports, it simply wraps, and quite a lot of embedded bugs live in that gap.
What it accepts
Digits with spaces, underscores, commas or apostrophes between them — all four are used as grouping separators in different languages, and all four are ignored. The prefixes 0x, 0b and 0o are understood, and if the prefix contradicts the base you selected you get told rather than getting a wrong answer. Letters are case-insensitive, so FF and ff are the same hex byte. Any base from 2 to 36 works; base 36 uses the digits 0–9 then A–Z, which is how short URL identifiers are usually generated.
Common questions
How do I convert binary to decimal by hand?
Write the place values above the digits from the right: 1, 2, 4, 8, 16, 32 and so on, doubling each time. Add up the place values wherever there is a 1. So 1011 is 8 + 2 + 1 = 11. The table on this page shows that expansion for whatever you type in.
What is denary?
It is the British school term for base 10 — the ordinary number system. Denary and decimal mean the same thing; the separate word exists so that “decimal” can keep referring to the point rather than the base.
How do I convert decimal to binary?
Divide by 2 repeatedly, writing down each remainder, until the quotient reaches zero. Then read the remainders backwards. Set the base selector to decimal and the page lists every division step so you can check your own working.
Does it handle very large numbers?
Yes. Everything is done with arbitrary-precision integers, so a 64-bit ID or a 200-digit binary string converts exactly. Converters built on ordinary JavaScript numbers start losing digits above about 9 quadrillion without saying so.
Can it convert binary fractions?
Yes, and exactly — the fractional part is kept as a ratio, not a floating-point value. Binary 0.101 is decimal 0.625 precisely. Where a fraction does not terminate in the target base, the output is cut off and marked with an ellipsis.
What does the two's complement setting do?
It shows how your number would sit in an 8, 16, 32 or 64-bit register. Negative values are stored as 2ⁿ minus the magnitude, which is why −1 is all ones. If the value will not fit in the chosen width, the page says so instead of wrapping silently.
Why is hexadecimal used so much?
Because one hex digit is exactly four binary digits, so conversion between them needs no arithmetic at all — you just group the bits in fours. That makes hex a compact way to write binary data, which is why it turns up in colour codes, memory addresses and hashes.
Is my input sent anywhere?
No. The conversion happens in this page using your browser's own big-integer arithmetic. Nothing is transmitted and nothing is stored.