What Is a Number Base Converter?
A number base converter translates numbers between different numeral systems. We normally count in decimal (base 10), using the digits 0–9. Computers work in binary (base 2), using only 0 and 1, because electronic circuits have two states, on and off. Programmers also use hexadecimal (base 16, digits 0–9 and A–F) as a compact way to write binary, since one hex digit is exactly four bits, and octal (base 8), which is still used for Unix file permissions.
This converter updates all bases live as you type in any of them, so you can type hex and read binary, or type binary and read decimal. It uses exact big-integer arithmetic, so even 100-digit numbers convert perfectly, and it also supports every base from 2 to 36, negative numbers and fractional values.
How to Convert Between Bases
- Type a number in any field: decimal, hex, binary, octal or a custom base.
- Read the other bases, which update instantly.
- Prefixes are optional: 0x, 0b and 0o are accepted and ignored.
- Check the extras: bit length, two's complement for negatives, the matching Unicode character, and the division working.
Common Values in Every Base
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 1 0000 | 20 | 10 |
| 64 | 100 0000 | 100 | 40 |
| 100 | 110 0100 | 144 | 64 |
| 255 | 1111 1111 | 377 | FF |
| 1024 | 100 0000 0000 | 2000 | 400 |
| 65535 | 1111 1111 1111 1111 | 177777 | FFFF |
How to Convert Decimal to Binary by Hand
Divide the number by 2 repeatedly and write down the remainders. Then read them from bottom to top. For 13: 13 ÷ 2 = 6 r 1, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, 1 ÷ 2 = 0 r 1, so 13 = 1101. To go back, multiply each binary digit by its place value (8, 4, 2, 1): 8 + 4 + 0 + 1 = 13. The same method works for any base: divide by 16 for hexadecimal, or by 8 for octal. The converter shows this working for decimal numbers up to one million.
Two's Complement for Negative Numbers
Computers store negative integers using two's complement: invert all the bits of the positive number and add one. In 8 bits, 5 is 0000 0101, so −5 is 1111 1011. This makes addition and subtraction work with the same circuits. When you enter a negative number, the converter shows its two's complement in the smallest standard width (8, 16, 32 or 64 bits) that fits.
Features
- Live, two-way conversionType in any base; all others update.
- Bases 2 to 36Including base 36 (0–9, A–Z).
- Unlimited sizeExact BigInt arithmetic for huge numbers.
- Negatives and fractionsWith two's complement output.
- Digit groupingReadable nibbles and octets.
- Step-by-stepDivision method for learning.
Where Different Number Bases Are Used
- Binary (base 2): everything inside a computer, including memory, processor instructions, network addresses and file data. IP subnet masks such as 255.255.255.0 are clearer in binary: 24 ones followed by 8 zeros.
- Hexadecimal (base 16): memory addresses, colour codes (#1E90FF), MAC addresses, Unicode code points (U+1F600), hashes and checksums, and debugging output. Two hex digits describe exactly one byte.
- Octal (base 8): Unix and Linux file permissions.
chmod 755means binary 111 101 101: read/write/execute for the owner, and read/execute for everyone else. - Base 36 and base 62: compact IDs such as short URLs, ticket codes and database keys.
- Base 60: inherited from Babylon and still used in time (60 seconds, 60 minutes) and angles.
Converting Between Binary and Hex Instantly
Because 16 = 24, you can convert between binary and hexadecimal without going through decimal. Group the binary digits in fours from the right and replace each group with its hex digit: 1101 0110 → D 6 → 0xD6. For octal, group in threes instead: 11 010 110 → 3 2 6 → 326. Turn on digit grouping to see these groups directly in the converter.
Frequently Asked Questions
How do I convert hex to decimal?
Multiply each digit by a power of 16 and add: 2F = 2×16 + 15 = 47. Or simply type it in the hex box.
What is 255 in binary?
1111 1111, eight ones, the largest value in one byte. In hex it's FF.
Why do programmers use hexadecimal?
Each hex digit represents exactly 4 binary digits, so long binary values become short and readable: 1111 1111 = FF.
What does 0x mean?
It's a prefix that marks a hexadecimal number in many programming languages, as in 0xFF. Similarly, 0b marks binary and 0o marks octal.
How are hex colours related?
A colour like #FF8800 is three hex bytes: red 255, green 136 and blue 0.
What is base 36?
It uses 0–9 and A–Z, the most compact case-insensitive alphanumeric base, often used for short IDs and URL shorteners.