Number Base Converter: Convert Between Binary, Hex, Octal & More
Number systems beyond decimal are fundamental in computing. Binary is how processors think, hexadecimal is how developers read memory and color codes, and octal shows up in Unix file permissions. Converting between these bases by hand is tedious and error-prone, especially for large values. Our Number Base Converter handles it all in real time.
Number Bases Explained
Binary (Base 2)
Uses only two digits: 0 and 1. Every value in a computer is ultimately stored in binary.
1101 in binary:
1*8 + 1*4 + 0*2 + 1*1 = 13 in decimal
- Digits: 0, 1
- Used in: CPU operations, bitwise logic, networking (subnet masks), digital electronics
- Prefix convention:
0b1101
Octal (Base 8)
Uses digits 0 through 7. Each octal digit represents exactly three binary digits, making it a compact way to express binary values.
755 in octal:
7*64 + 5*8 + 5*1 = 493 in decimal
- Digits: 0-7
- Used in: Unix file permissions, some legacy systems
- Prefix convention:
0o755or0755
Decimal (Base 10)
The standard number system humans use daily. Ten digits, positional notation.
- Digits: 0-9
- Used in: Everyday math, most user-facing displays, financial calculations
Hexadecimal (Base 16)
Uses digits 0-9 and letters A-F. Each hex digit represents exactly four binary digits, making it the most common way to express binary data compactly.
FF in hexadecimal:
15*16 + 15*1 = 255 in decimal
- Digits: 0-9, A-F
- Used in: Memory addresses, color codes (#FF5733), MAC addresses, byte values, cryptographic hashes
- Prefix convention:
0xFF
Custom Bases (Base 2-36)
Any integer base from 2 to 36 is possible. Bases above 10 use letters A-Z as additional digits.
- Base 32: Used in Crockford encoding and some hash formats
- Base 36: Maximum base using 0-9 and A-Z, sometimes used for compact URL-safe identifiers
Why These Bases Matter
Hex and Colors
CSS colors are hexadecimal RGB values. #FF5733 breaks down as:
FF = 255 (red channel)
57 = 87 (green channel)
33 = 51 (blue channel)
Understanding hex-to-decimal conversion helps you read and adjust colors without a picker.
Binary and Permissions
Unix file permissions use octal, which maps cleanly to binary:
Permission: rwxr-xr-x
Binary: 111 101 101
Octal: 7 5 5
Each group of three bits (read, write, execute) maps to one octal digit.
Memory and Debugging
Memory addresses and byte dumps are displayed in hex because two hex digits represent one byte perfectly:
Byte value range: 0-255 (decimal)
In hex: 00-FF
In binary: 00000000-11111111
Hex is more readable than binary and more precise than decimal for byte-level work.
How to Use Our Number Base Converter
- Enter a number in any supported base
- Select the input base (binary, octal, decimal, hex, or custom)
- See all conversions update instantly across every base
- Copy the output format you need
Tips
- The converter validates input against the selected base — you cannot enter “9” in octal or “G” in hex
- Letters in hexadecimal are case-insensitive (ff = FF)
- For custom bases, select any value from 2 to 36
- Large numbers are handled with full precision
Conversion Reference Table
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 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 |
| 1000 | 1111101000 | 1750 | 3E8 |
Practical Use Cases
Reading Debug Output
A crash report shows a memory address 0x7FFF5FBFF8A0. Converting to decimal gives 140,734,799,804,576. Converting to binary helps you analyze alignment and page boundaries.
Subnet Mask Calculations
The subnet mask 255.255.255.0 in binary is 11111111.11111111.11111111.00000000, showing exactly 24 network bits. Networking becomes clearer when you see the binary representation.
Bitwise Flag Operations
Feature flags stored as a single integer become readable in binary. If a user’s permissions are 13 in decimal, that is 1101 in binary — flags 0, 2, and 3 are set while flag 1 is off.
Embedded Systems
Working with hardware registers requires constant conversion between hex (documentation format), binary (individual bit meanings), and decimal (human-readable values).
Frequently Asked Questions
Why is hexadecimal used instead of decimal for byte values? One hex digit represents exactly 4 bits, and two hex digits represent exactly one byte (8 bits). This 1:4 and 2:8 mapping makes hex a natural fit. Decimal has no clean mapping to binary digit groups.
What is the largest base I can use? Base 36 is the practical maximum using the digits 0-9 and letters A-Z. Bases above 36 would require additional symbols beyond the standard alphanumeric set.
How do I convert negative numbers? Negative numbers in binary are typically represented using two’s complement. Our converter handles unsigned values. For signed representations, you would need to account for the bit width (8-bit, 16-bit, 32-bit, or 64-bit).
Why does octal appear in Unix file permissions? Each permission group (owner, group, other) has three flags (read, write, execute), which maps perfectly to three binary digits, which maps to one octal digit. The number 755 is more readable than 111101101.
Try our free Number Base Converter to convert between binary, hex, octal, and any base instantly.
Try Ghost Image Hub
The Chrome extension that makes managing your Ghost blog images a breeze.
Learn More