How to use the Binary Converter
- Type a number in the box for its base — binary, octal, decimal or hex.
- The other three boxes update as you type.
- Copy any result with one click.
How it works
Each digit is multiplied by the base raised to its position: 1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11. Converting the other way repeatedly divides by the target base and reads the remainders backwards.
Arbitrary-precision integers (BigInt) are used, so 64-bit and larger values convert exactly.
Worked examples
255
Decimal 255 = binary 1111 1111 = hex FF = octal 377 — the largest value in one byte.
Hex colour
Hex 1E = 30 in decimal, the value of one colour channel in #1E90FF.
Limitations and assumptions
- Whole numbers only (no fractional binary).
Frequently asked questions
How do I convert binary to decimal by hand?
Write the powers of 2 under the digits from right to left (1, 2, 4, 8, 16…), then add the powers where the digit is 1.
Why do programmers use hex?
Each hex digit is exactly 4 bits, so a byte is always two hex digits — much shorter to read than binary.
Built and reviewed by Guru G
Calculation logic is covered by automated tests against known values. Last reviewed Nov 8, 2026. Found a problem? Let us know — see our editorial policy.