Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal. Supports large numbers with BigInt precision.
Base Conversion Reference
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 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 |
Common Values in Programming
Frequently Asked Questions
What number bases are supported?
This converter supports the 4 most common bases in programming: binary (base 2, used in low-level computing), octal (base 8, used in Unix file permissions), decimal (base 10, standard human notation), and hexadecimal (base 16, used in memory addresses, colors, and byte representation).
Can this handle very large numbers?
Yes! The converter uses JavaScript BigInt for arbitrary precision arithmetic. You can convert numbers of any size — there's no practical upper limit. This is important for cryptography, hash values, and large binary data.
What are the 0b, 0o, and 0x prefixes?
These are standard programming notation prefixes: 0b for binary (0b1010 = 10), 0o for octal (0o12 = 10), and 0x for hexadecimal (0xA = 10). Most programming languages (JavaScript, Python, C, Java) use these prefixes. You can paste numbers with or without prefixes.
Why is hexadecimal so common in programming?
Each hex digit represents exactly 4 binary bits, making it a compact way to represent binary data. One byte (8 bits) is exactly 2 hex digits. This is why hex is used for memory addresses, color codes (#FF0000), MAC addresses, and byte sequences.