Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and any base from 2-36
Enter a value in any input field to see real-time conversion results for all bases.
Related Tools
Scientific Calculator
Base Converter Documentation
What is a Number Base (Radix)?
A number base, also called radix or numeral system, defines how many different digits are used to represent numbers in positional notation. The most common in daily life is decimal (base 10) using digits 0-9. Computers primarily use binary (base 2), while programmers often use hexadecimal (base 16) and octal (base 8) for more compact representation of binary data.
Common Number Systems
| Base | Name | Digits | Common Uses |
|---|---|---|---|
| 2 | Binary | 0, 1 | Digital circuits, computer memory, machine code |
| 8 | Octal | 0-7 | Unix file permissions, legacy computer systems |
| 10 | Decimal | 0-9 | Daily mathematics, human-readable numbers |
| 16 | Hexadecimal | 0-9, A-F | Memory addresses, color codes (CSS/HTML), byte representation |
Conversion Principle
Converting a number from one base to another involves two main steps:
- Convert source number to decimal (base 10): multiply each digit by its positional value (base^position) and sum
- Convert decimal result to target base using successive division: divide by target base and collect remainders
- Read remainders in reverse order to get the final result in target base
Conversion Example
Binary 1101 → Decimal: (1×8) + (1×4) + (0×2) + (1×1) = 13
Each binary digit represents a power of 2: from right to left 2⁰=1, 2¹=2, 2²=4, 2³=8, and so on.
Quick Reference Table (0-15)
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 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 Use Cases
- Programming: debugging memory addresses, understanding bitwise operations, handling low-level data
- Web development: converting CSS/HTML color codes between RGB decimal and hexadecimal formats
- Networking: understanding IP addresses, subnet masks, and MAC addresses in different formats
- Digital electronics: analyzing logic circuits, understanding binary arithmetic
- Data analysis: processing encoded data, parsing binary file formats
Usage Tips
- Hexadecimal digits A-F represent decimal values 10-15. 0xFF equals decimal 255.
- Each hexadecimal digit represents exactly 4 binary bits, making hex a convenient shorthand for binary.
- This tool uses BigInt for arbitrary precision, allowing conversion of very large numbers without precision loss.
Frequently Asked Questions
How do I convert hexadecimal to decimal?
Enter your hexadecimal number (e.g., '1A') in the 'Hexadecimal' input box. The decimal equivalent (e.g., '26') will automatically appear in the 'Decimal' field.
What is Base64?
Base64 is a binary-to-text encoding scheme, not a number base like binary or decimal. It's used to represent binary data in ASCII string format. For Base64 conversion, please use our dedicated Base64 encoder/decoder tool.
Why use hexadecimal instead of binary?
Hexadecimal is much more compact than binary. One hex digit represents 4 binary digits. For example, binary '11111111' is just 'FF' in hex. This makes it easier for humans to read and write large binary values.
Does this tool support large numbers?
Yes! The tool uses JavaScript BigInt technology to handle arbitrarily large integers, so you can convert numbers much larger than standard 64-bit integers without losing precision.
What's the maximum base supported?
In 'Custom Base' mode, you can convert between any bases from 2 to 36. Standard bases (2, 8, 10, 16) are provided in the main view for quick access.