Binary/Decimal Converter
Convert between Binary, Decimal, Octal, and Hexadecimal number systems.
What is the Binary/Decimal Converter?
The Binary/Decimal Converter is a free online tool that converts numbers between binary (base 2) and decimal (base 10), and also shows the matching hexadecimal and octal values. Type a number into either field and the other updates instantly.
Beyond the raw conversion, the tool draws a bit-by-bit breakdown: each binary digit is placed over its power of two, so you can see exactly which bits contribute to the total and how the sum 2^0 + 2^1 + ... produces the decimal result.
It runs entirely in your browser with no signup and no data sent to a server. Conversions happen client-side as you type, so it works the same whether you are online or offline once the page has loaded.
How to use the Binary/Decimal Converter
- 1Type a binary number into the Binary Input field; only 0 and 1 are kept, other characters are ignored.
- 2Or type a whole number into the Decimal Input field to convert in the other direction.
- 3Read the converted value in the opposite field, which updates on every keystroke.
- 4Check the Binary Breakdown section to see each bit mapped to its power of two and the addition that produces the decimal value.
- 5Use the Other Number Systems panel to copy the hexadecimal, octal, or binary form, or click a preset like 255 or 256 to load a common value.
- 6Press Ctrl+L to reset both fields back to the default example.
What you can use it for
- Checking the decimal value of a bitmask or set of permission flags while debugging.
- Learning how positional notation works when studying for a computer science course or exam.
- Converting a byte value such as 11111111 to confirm it equals 255 before writing it into code.
- Translating a color channel or hardware register value between binary, decimal, and hexadecimal.
- Verifying the output of parseInt(str, 2) or num.toString(2) calls during JavaScript development.
- Explaining powers of two to a teammate with a concrete, visual bit breakdown.
Key features
- Two-way live conversion between binary and decimal as you type.
- Automatic hexadecimal (0x) and octal (0o) equivalents for the current value.
- Visual bit breakdown showing each digit's power of two and the running sum.
- One-click copy for binary, decimal, hex, and octal values.
- Preset buttons for common values like 8, 16, 255, and 256.
Frequently asked questions
How do I convert binary to decimal?
Enter your binary number in the Binary Input field and the decimal equivalent appears immediately in the Decimal Input field. Internally each 1 bit is multiplied by its power of two and the results are summed, which is the same as JavaScript's parseInt(value, 2).
How do I convert a decimal number to binary?
Type a whole decimal number into the Decimal Input field and the binary form updates automatically. The tool uses repeated division by two, equivalent to calling num.toString(2) in JavaScript.
Does the binary decimal converter also show hexadecimal and octal?
Yes. The Other Number Systems panel shows the current value in hexadecimal (base 16) prefixed with 0x and octal (base 8) prefixed with 0o, alongside the binary form. Each has its own copy button.
What happens if I type a non-binary character in the binary field?
Any character that is not 0 or 1 is stripped out before conversion, so pasting text with spaces or other digits will not break the decimal result. The field shows a reminder that only 0 and 1 are allowed.
Is the binary decimal converter free and private?
Yes. The tool is completely free, requires no signup, and runs entirely in your browser. No numbers you enter are sent to a server.
How many bits are in a byte and what is the maximum value?
A byte is 8 bits. The largest value an unsigned byte can hold is 11111111 in binary, which equals 255 in decimal. You can load this with the 255 preset to see the full bit breakdown.