Number Base Converter
Enter a number in any base and see it instantly converted to binary, octal, decimal, and hexadecimal.
Last updated
How to convert between binary, hex and decimal
- Type a number.
- Choose the base it’s written in, or use a
0x,0oor0bprefix. - Read it in binary, octal, decimal and hexadecimal.
How base conversion works
Every number system represents the same value using a different number of digit symbols: binary uses 2 (0–1), octal uses 8 (0–7), decimal uses 10 (0–9), and hexadecimal uses 16 (0–9 then A–F). Converting between them means re-expressing the same underlying quantity in a different digit count — the value doesn't change, only its written form.
This tool parses your input in the selected base and re-renders it in all four using JavaScript's BigInt, so whole numbers of any size stay exact, and negative numbers work too (shown with a minus sign rather than as two's complement). A 0x, 0o or 0b prefix reads the number as hexadecimal, octal or binary whatever the menu says, and spaces or underscores used to group digits are ignored.
Questions about number bases
How do I convert binary to decimal?
Each binary digit is worth double the one to its right. 1011 is 8 + 0 + 2 + 1 = 11.
What is hexadecimal?
Base 16, using 0–9 and A–F. One hex digit is exactly four binary digits, which is why it’s used for colours and memory addresses. FF is 255.
Can it convert very large numbers?
Yes. Whole numbers of any length stay exact, and negative numbers work too.
Can I paste numbers with spaces or underscores?
Yes. Spaces and underscores used to group digits, as in 1111_0000, are ignored.