Convert between number systems instantly
Computers think in binary, programmers write colours and memory addresses in hexadecimal, Unix file permissions use octal, and people count in decimal. This number base converter translates between all of them at once: type a value in any field and see it in every other base immediately. It also converts to any custom base from 2 to 36 and handles numbers of unlimited size.
Features
- Binary, octal, decimal and hexadecimal side by side, all editable.
- Custom bases from 2 to 36, such as base 3, base 12 or base 36.
- Unlimited size with exact arbitrary-precision arithmetic.
- Negative numbers with a leading minus sign.
- Prefixes and separators like
0x,0b,0o, spaces and underscores are ignored. - Digit grouping in fours or threes for easier reading.
- Bit length of the number shown automatically.
Common conversions
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 1024 | 10000000000 | 2000 | 400 |
| 65535 | 1111111111111111 | 177777 | FFFF |
Where each base is used
- Binary (base 2) — the language of digital circuits; each digit is one bit.
- Octal (base 8) — Unix file permissions such as
chmod 755, where each digit stands for three bits. - Decimal (base 10) — everyday numbers.
- Hexadecimal (base 16) — memory addresses, colour codes like
#FF8800, byte values, hashes and MAC addresses; each hex digit stands for exactly four bits. - Base 36 — compact identifiers such as short URLs, using all digits and letters.
Tips
- One byte is 8 bits, or exactly two hexadecimal digits — FF is 255, the largest byte value.
- To convert hex colour codes to RGB values, use the Color Converter.
- For calculations with powers of two, the Scientific Calculator supports expressions like
2^32.