Number Base Converter
Convert binary, octal, decimal, hex
4 number bases
Reference table
Instant conversion
The color code is #FF5733—what's that in RGB decimal? The IP address in binary has a specific pattern—what's 11000000.10101000.00000001.00000001 in dotted decimal? The assembly reference shows 0x7FFF—what's that in decimal?
Number base conversion is fundamental to computing, networking, and digital systems. This calculator converts between binary, decimal, hexadecimal, octal, and any base from 2 to 36.
What is Number Base Conversion?
Number base conversion transforms how a quantity is represented between different numeral systems. Our everyday decimal uses base 10. Computers use binary (base 2). Programmers use hex (base 16) for compact binary representation.
Common bases:
Binary (base 2): 0, 1
Octal (base 8): 0-7
Decimal (base 10): 0-9
Hexadecimal (base 16): 0-9, A-F
Examples:
255 decimal = 11111111 binary = FF hex = 377 octal
Each hex digit represents exactly 4 binary digits. FF = 1111 1111. This is why programmers prefer hex—it's human-readable binary.
Why People Actually Need This Tool
Every computer operation is fundamentally binary. Hex and octal are human-friendly ways to work with binary data.
-
Programming — Convert between hex, decimal, and binary.
-
Color codes — Translate between hex colors and RGB values.
-
Networking — Convert IP addresses and subnet masks.
-
Electronics — Work with binary data and addressing.
-
Permissions — Understand Unix octal permissions (chmod 755).
-
Memory addresses — Read hex memory dumps.
-
Data encoding — Convert character codes between bases.
How to Use the Number Base Converter
-
Enter number — In your source base format.
-
Select source base — Binary, decimal, hex, octal, or custom.
-
Select target base — What format you want.
-
View result — Converted value, often with multiple base outputs.
| Base | Digits Used | Prefix | Common Use |
|---|---|---|---|
| Binary (2) | 0, 1 | 0b | Machine code, bit manipulation |
| Octal (8) | 0-7 | 0o | Unix permissions |
| Decimal (10) | 0-9 | none | Human numbers |
| Hex (16) | 0-9, A-F | 0x or # | Memory, colors, programming |
| Base 36 | 0-9, A-Z | varies | URL shorteners, compact IDs |
Hex digits A-F can be uppercase or lowercase. FF = ff = Ff. Be consistent for readability.
Real-World Use Cases
1. The Color Conversion
Context: CSS color #3498DB. Need RGB values for image editor.
Problem: Convert hex to decimal RGB.
Solution: 34 hex = 52, 98 hex = 152, DB hex = 219. RGB(52, 152, 219).
Outcome: Color matched across different applications.
2. The Unix Permissions
Context: chmod 755 on a file. What permissions is that?
Problem: Understand octal permission number.
Solution: 7 = 111 (rwx), 5 = 101 (r-x). So: rwxr-xr-x.
Outcome: Permission structure understood.
3. The IP Address
Context: Subnet mask 255.255.255.0 in binary.
Problem: What's the binary pattern?
Solution: 255 = 11111111. Mask = 11111111.11111111.11111111.00000000.
Outcome: Network/host bit boundary visible in binary.
4. The Memory Address
Context: Debugger shows address 0x7FFFFFFF.
Problem: What's that in decimal?
Solution: 0x7FFFFFFF = 2,147,483,647 (max signed 32-bit integer).
Outcome: Understanding of memory layout.
5. The Bitwise Operation
Context: Need to set bit 5 (0-indexed) in a byte.
Problem: What value to OR with?
Solution: Bit 5 = 2^5 = 32 decimal = 0x20 = 0b00100000.
Outcome: Correct mask for bit manipulation.
6. The ASCII Code
Context: Character 'A' in various representations.
Problem: What are the values?
Solution: 'A' = 65 decimal = 41 hex = 101 octal = 1000001 binary.
Outcome: Character encoding understood across bases.
7. The Short URL
Context: Need to encode ID 12345678 compactly.
Problem: Represent in base 36 for URL.
Solution: 12345678 base 10 = 7CLZI base 36 (5 characters vs 8).
Outcome: Compact URL encoding achieved.
Common Mistakes and How to Avoid Them
In most math, 007 = 7. In some programming languages, 007 might be interpreted as octal (= 7 decimal anyway, but 010 octal = 8 decimal).
Privacy and Data Handling
This Number Base Converter operates entirely in your browser.
- No conversions are sent to any server.
- No data is stored.
- No account required.
- Works completely offline.
Your data stays private.
Conclusion
Number base conversion is essential for anyone working with computers, networks, or digital systems. Understanding binary, hex, and octal representations demystifies how computers actually work.
This converter handles any base from 2 to 36. Enter a number, get equivalents in all common bases, or specify exactly what conversion you need.
Speak the language of machines.