Number Base Converter
Convert numbers between different bases (binary, octal, decimal, hexadecimal, and more).
All Base Conversions
| Binary (base 2) | - |
| Octal (base 8) | - |
| Decimal (base 10) | - |
| Hexadecimal (base 16) | - |
| Base 32 | - |
| Base 36 | - |
Quick Reference
- Binary (base 2): Uses digits 0-1
- Octal (base 8): Uses digits 0-7
- Decimal (base 10): Uses digits 0-9
- Hexadecimal (base 16): Uses 0-9 and A-F
- Base 32: Uses 0-9 and A-V
- Base 36: Uses 0-9 and A-Z
What Is Number Base Conversion?
Number base conversion transforms a number from one positional numeral system to another. In computing, the most important bases are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Understanding these systems is fundamental to programming, networking, cryptography, and hardware engineering.
Common Number Bases
| Base | Name | Digits | Use Cases |
|---|---|---|---|
| 2 | Binary | 0, 1 | CPU instructions, bitwise operations, network masks |
| 8 | Octal | 0-7 | Unix file permissions (e.g., chmod 755) |
| 10 | Decimal | 0-9 | Human-readable numbers, mathematics |
| 16 | Hexadecimal | 0-9, A-F | Memory addresses, colors (#FF0000), MAC addresses |
| 32 | Base32 | A-Z, 2-7 | TOTP tokens, case-insensitive encoding |
| 36 | Base36 | 0-9, A-Z | Short URLs, compact identifiers |
| 64 | Base64 | A-Z, a-z, 0-9, +, / | Binary data encoding in text (email, APIs) |
How Conversion Works
Converting between bases follows a two-step process:
- Convert to decimal: Multiply each digit by its positional value. For example, binary
1011= 1ร2ยณ + 0ร2ยฒ + 1ร2ยน + 1ร2โฐ = 8 + 0 + 2 + 1 = 11. - Convert from decimal: Repeatedly divide by the target base and collect remainders. For example, 11 in hex: 11 รท 16 = 0 remainder 11 (B), so 11 decimal = B hex.
Common Use Cases
- Web Development: Convert between hex color codes and RGB values.
- Networking: Convert IP addresses and subnet masks between decimal and binary.
- Debugging: Read memory dumps and register values in hexadecimal.
- Permissions: Understand and calculate Unix file permission octals.
- Education: Learn and practice number system conversions.
How to Use This Tool
- Enter a number in any supported base (binary, decimal, hex, octal).
- Select the source base from the dropdown.
- View instant conversions to all other bases.
- Click any result to copy it to your clipboard.
Why Use This Tool?
- Convert between binary, decimal, hexadecimal, and octal instantly.
- Essential for low-level programming and debugging.
- All conversions run in your browser โ fast and accurate.
- Supports large numbers and shows all bases simultaneously.
Frequently Asked Questions
Why do computers use binary?
Digital circuits have two stable states (on/off, high/low voltage), which naturally maps to binary (0 and 1). Every piece of data in a computer โ numbers, text, images, programs โ is ultimately stored and processed as binary.
Why is hexadecimal so common in programming?
Each hex digit represents exactly 4 binary bits, making it a compact and readable way to express binary values. A byte (8 bits) is represented by exactly 2 hex digits, so a 32-bit value is just 8 hex characters instead of 32 binary digits.