Number Base Converter
Convert integers between binary, octal, decimal, hexadecimal and any base from 2 to 36. Enter a value, choose its base, and every other base updates instantly. Arbitrary-size integers are supported (exact, no rounding).
What is a number base?
A number base — or radix — is how many distinct digits a positional number system uses. Base 10 (decimal) uses ten digits, 0–9; base 2 (binary) uses only 0 and 1. In every base each position is worth the base raised to a power, so the binary number 1011 means 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.
The four common bases
- Binary (base 2) is the native language of computers: every bit is 0 or 1, matching a circuit's off/on state.
- Octal (base 8) packs three bits into one digit and was long used for Unix file permissions such as 755.
- Decimal (base 10) is the everyday human system, using the ten digits 0–9.
- Hexadecimal (base 16) is a compact way to write binary — one hex digit equals four bits, so a byte is exactly two hex digits (FF = 255). It is used for colours, memory addresses and byte dumps.
How to convert between bases
- Decimal to binary: divide by 2 repeatedly and record each remainder, then read them bottom to top. 13 becomes 1101.
- Binary to decimal: multiply each digit by its place value (…8, 4, 2, 1) and add. 1101 becomes 8 + 4 + 0 + 1 = 13.
- Hexadecimal to binary: convert one hex digit at a time into four bits. FF becomes 1111 1111, and 2A becomes 0010 1010.
Number base conversion table
Common decimal values shown in binary, octal and hexadecimal.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 512 | 1000000000 | 1000 | 200 |
| 1024 | 10000000000 | 2000 | 400 |
Powers of two
| Power | Decimal value | Hex |
|---|---|---|
| 20 | 1 | 1 |
| 21 | 2 | 2 |
| 22 | 4 | 4 |
| 23 | 8 | 8 |
| 24 | 16 | 10 |
| 25 | 32 | 20 |
| 26 | 64 | 40 |
| 27 | 128 | 80 |
| 28 | 256 | 100 |
| 29 | 512 | 200 |
| 210 | 1024 | 400 |
| 216 | 65536 | 10000 |
| 220 | 1048576 | 100000 |
| 230 | 1073741824 | 40000000 |
| 232 | 4294967296 | 100000000 |
Frequently asked questions
What bases can I convert between?
Any base from 2 to 36. Digits 0-9 then a-z represent values 0 to 35, so base 16 uses 0-9 and a-f, and base 36 uses 0-9 and a-z.
Is there a size limit on the number?
No. Conversion uses arbitrary-precision integers, so very large values (hundreds of digits) convert exactly without rounding or overflow.
How do I convert decimal to binary by hand?
Repeatedly divide the decimal number by 2 and record each remainder; reading the remainders from last to first gives the binary representation.
Why do computers use binary?
Digital circuits have two stable states — off and on — that map directly to 0 and 1, making binary the most reliable way to store and process data electronically.
What is hexadecimal used for?
Hexadecimal is a human-friendly shorthand for binary: colours (#FF9E0B), memory addresses, MAC addresses and byte-level data are almost always written in hex, because one hex digit maps to exactly four bits.
How many digits does base 36 use?
Base 36 uses 0–9 followed by a–z — thirty-six symbols in total — which is the largest base this tool supports with the standard alphanumeric digit set.