Hex to Decimal Converter
Convert hex to decimal
Convert between binary, octal, decimal, hex and any base to 36, with two's complement.
Free, private, no sign-up
Was this tool helpful?
Suggest an improvementHow to use it
Type a whole number in any field: binary, octal, decimal, hex, or a base of your choice from 2 to 36. The other fields update as you type. Spaces and underscores between digits are fine, so you can paste 1111_0000 or FF FF. Each field has a Copy button, which copies the digits without spaces.
How number bases work
In base 10 each place is worth ten times the one to its right: 255 is 2 ร 100 + 5 ร 10 + 5. Binary does the same with 2: 11111111 is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. Hex uses sixteen digits, 0โ9 and then AโF for 10 to 15, so 255 is FF (15 ร 16 + 15). Bases above 10 keep going through the alphabet, up to Z for 35 in base 36.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 255 | 1111 1111 | 377 | FF |
| 4,096 | 1 0000 0000 0000 | 10000 | 1000 |
| 65,535 | 1111 1111 1111 1111 | 177777 | FFFF |
Good to know
Can I paste 0x, 0b or 0o prefixes?
Yes, in their own field: 0x in hex, 0b in binary and 0o in octal. In the hex field, 0b1 is read as the hex digits B and 1 (177), because B is a hex digit.
What is two's complement?
It's how computers store negative whole numbers in a fixed number of bits. Choose 8, 16, 32 or 64 bits: binary, octal and hex then show the stored bit pattern, and decimal shows the signed value. โ1 in 8 bits is 1111 1111 (FF), and typing 0x80 in hex reads as โ128.
How big can the numbers be?
As big as you like, up to 4,096 characters. There's no 64-bit limit unless you choose a width.
Can I convert fractions like 0.1?
No, only whole numbers. Many fractions never end in another base (0.1 in binary repeats forever), so they need rounding rules this tool doesn't guess at.
Is my number sent anywhere?
No. Everything is worked out in your browser.