Number Base Converter
Binary, hex, octal, decimal
Text ⇄ binary / hex
About the Number Base Converter
Convert numbers between the bases used in computing. Type in any field to update the others instantly: binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16) or a custom base up to 36. Large numbers are handled exactly using BigInt.
- Type a number in any of the base fields.
- The other bases update instantly.
- Use the text section to convert words to binary or hex and back.
Frequently asked
How do I convert binary to decimal?
Multiply each digit by 2 raised to its position (counting from 0 on the right) and add them up. For example, 1011 = 8 + 0 + 2 + 1 = 11.
How do I convert decimal to hex?
Divide by 16 repeatedly and write down the remainders (0–9, A–F) in reverse order. 255 is FF.
Can it handle very large numbers?
Yes, it uses JavaScript BigInt, so there is no precision loss even for numbers with hundreds of digits.
Is what I type sent to a server?
No. The tool runs entirely in your browser and there's no server behind it, so what you type never leaves your device and nothing is stored. You can check: it keeps working if you go offline after the page has loaded.
More from the Developer drawer
Other tools kept in this drawer, plus a few favourites from the bench.