About Binary to Decimal
Binary to decimal reads a binary string and returns the number it represents — 1010 becomes 10, and eight ones become 255. It is the most direct way to check what a bit pattern actually means, whether it came from a mask in a configuration file, a bit field in a protocol document, or a value you assembled by hand.
Each token is read as a whole binary number rather than being split into bytes, so the tool answers the question "what number is this?" rather than "what bytes are these?". Multiple values can be separated by spaces or commas and each is converted on its own.
This is the conversion that makes bit masks concrete. Reading that a flag field uses the mask 00000100 tells you very little; seeing that it equals 4 tells you immediately which bit is being tested, which is usually the thing you actually needed to know.
The parse is strict in a way the hex counterpart is not: a token has to consist of zeros and ones. A token containing any other digit — or a stray letter, or an 0b prefix carried over from source code — is passed through to the output untouched rather than producing a number or an error message, so a mixed result usually means one of the tokens was not really binary. There is no setting for how many bits a value should be treated as occupying, no signed interpretation for two's complement, no bitwise operations to apply afterwards, and no conversion in the other direction from this page.
How to use Binary to Decimal
- 1 Enter one or more binary values, separated by spaces or commas.
- 2 Each is converted to its decimal equivalent and shown immediately.
- 3 Copy the results for use in arithmetic, comparisons or configuration.
Frequently asked questions
Do I need to pad the binary to eight digits?
No. Leading zeros do not change the value, so 1010 and 00001010 both give 10. Padding is useful for visual alignment when reading a table, but it has no effect on the conversion.
What is a bit mask and why would I convert one?
A bit mask is a value with specific bits set to single out parts of a larger field. Converting it to decimal makes it usable in code, since most languages expect the mask as a number — a mask of 00000100 is bit 2, which is the decimal value 4.
Why does a long binary string give an unexpected number?
Usually because it was split into bytes elsewhere and reassembled differently here. This tool treats each token as one continuous number, so if the value arrived grouped into bytes with spaces, it converts each group separately rather than as one larger value.
How large a binary string can it handle?
Conversion uses standard number handling, so very long strings exceed the available precision. For values that need to be exact far beyond 53 bits, an arbitrary-precision conversion is required instead.
Free, online, and private
Free to use
Binary to Decimal is completely free. There is no account to create, no login, and no hidden charge or usage limit.
Runs online in your browser
It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.
Your data stays private
All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.
How Binary to Decimal behaves in detail
These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.
| Parameter | Value |
|---|---|
| Tokenizer | split on runs of whitespace or commas, empty pieces dropped |
| Digit parsing | parseInt with radix 2 |
| Unparsable token | returned unchanged, exactly as typed, instead of being flagged |
| Prefix handling | a 0b prefix is not understood — parseInt stops at the b and the token reads as 0 |
| Output form | plain decimal integers joined by single spaces, no zero padding |
Compiled from the implementation of this tool and checked against it by itoolnet.
What Binary to Decimal does not do
Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.
- Parsing stops at the first digit outside the radix instead of rejecting the token, so 1012 is read as binary 101 and reported as 5 — the trailing 2 disappears with no warning and no error row.
- Every token goes through a JavaScript number, which is a 53-bit double, so a long bit pattern loses its low bits: a 64-bit string returns an approximation of the decimal value rather than the exact integer.
- Tokens are joined back with a single space and nothing is aligned, and a token that fails to parse is echoed in place, so a mixed input produces an output where converted numbers and untouched text are indistinguishable at a glance.
Tested and documented by itoolnet, the team that builds and maintains this site.