About this tool
In everyday life we count in decimal with ten digits. Computers work in binary with 0 and 1. Programmers also rely on hexadecimal (base 16, digits 0–9 and A–F) and octal (base 8) because they represent binary numbers compactly: one hex digit equals exactly 4 bits.
This converter converts integers between decimal, hex, binary, octal and any base from 2 to 36 – exactly, even for numbers with hundreds of digits. It also shows the two’s complement for 8, 16, 32 and 64 bits and converts Roman numerals. Every field is editable and all others update instantly.
How it works
- Enter a number in any field, e.g. 255 in decimal or FF in hexadecimal.
- All other representations update automatically.
- Set a custom base between 2 and 36 under “Base” if you need another system.
- Under “Two’s complement” you see how the number is stored in 8 to 64 bits.
Frequently asked questions
How do I convert decimal to binary?
Divide the number by 2 repeatedly and write down the remainders from bottom to top. 13 gives 6 remainder 1, 3 remainder 0, 1 remainder 1, 0 remainder 1 – so 1101. The tool does it instantly, even for very large numbers.
What is two’s complement?
It is how computers store negative integers: invert all bits and add 1. In 8 bits, −1 becomes 11111111 (FF). For each bit width the tool shows whether the number fits and what its unsigned and signed values are.
Can I use prefixes like 0x or 0b?
Yes. In the matching field, 0x (hex), 0b (binary) and 0o (octal) are recognized. Spaces, underscores and apostrophes used for grouping are ignored, and a minus sign is allowed.
Why do Roman numerals stop at 3999?
With the standard symbols I, V, X, L, C, D and M, the largest number you can write is MMMCMXCIX (3999). Larger values used special symbols that are hardly used today. Roman numerals have no zero.
How do I convert text rather than numbers to hex?
Use the Text ↔ Hex / Binary / ASCII. It shows the UTF-8 bytes of a text as hex, binary, decimal and octal.