Number Base Converter — Decimal, Binary, Octal, Hex
Convert numbers between decimal, binary, octal, and hexadecimal instantly. Supports large numbers using BigInt. Essential for programming and computer science.
Base 10
Base 2
Base 8
Base 16
Try:
Binary Bit Visualization
Number Base Reference
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
| 65535 | 1111111111111111 | 177777 | FFFF |
Frequently Asked Questions
What is binary (base-2)?
Binary is a number system using only 0 and 1. It is the fundamental language of computers. Every piece of data in a computer is ultimately stored and processed as binary. For example, the decimal number 10 = binary 1010.
What is hexadecimal (base-16)?
Hexadecimal (hex) uses 16 digits: 0-9 then A-F (where A=10, B=11, C=12, D=13, E=14, F=15). It is used extensively in computing for memory addresses, color codes (#FF5733), and error codes. Decimal 255 = Hex FF.
What is octal (base-8)?
Octal uses digits 0-7. It is commonly used in Unix/Linux file permissions (e.g., chmod 755 means rwxr-xr-x in permissions). Decimal 8 = Octal 10. Decimal 255 = Octal 377.
How do I convert decimal to binary?
Divide the decimal number by 2 repeatedly, recording the remainder each time. Read the remainders from bottom to top. Example: 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1. Reading remainders upward: 1101.
What are the limits for large number conversion?
JavaScript's built-in integer handling is accurate up to 2^53 - 1 (about 9 quadrillion). For very large binary numbers (more than 53 bits), this calculator uses BigInt for accurate conversion. Numbers entered as binary can be up to 64 bits long.