Number Base Converter
Convert any number between binary, octal, decimal and hexadecimal — type in any box and see all four representations instantly, with step-by-step working.
Enter a value in any base
base 2
base 8
base 10
base 16
Interesting numbers to try
Step-by-step solution
Type a number in any box to see instant conversions and step-by-step working.
Hexadecimal Digits Quick Reference
Number Base Converter Explained
Core concepts, classroom applications, and plain-English explanations for all audiences.
Why computers use different number bases
Every photo you take, every message you send, every video you stream is stored as a sequence of 1s and 0s — binary (base 2). Computers use binary because electronic circuits have two states: on or off. Hexadecimal (base 16) is a shorthand for binary that humans can read: every two hex digits represent one byte.
Worked example
"Convert decimal 25 to binary."
25 ÷ 2 = 12 remainder 1
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Read remainders upward: 11001
Check: 16 + 8 + 0 + 0 + 1 = 25 ✓
Where you see these bases
- → Base 2 (binary): Inside every processor, hard drive, and memory chip
- → Base 16 (hex): Colour codes (#FF5733 in CSS/HTML), memory addresses, error codes
- → Base 60: Minutes and seconds — 60 seconds in a minute, 60 minutes in an hour, inherited from ancient Babylon
Hex letters A–F
Hexadecimal needs 16 digits but we only have 10 numerals, so letters are used: A=10, B=11, C=12, D=13, E=14, F=15. The colour white in web design is #FFFFFF — three bytes all at maximum value (255 in decimal).
Understanding Number Bases: Binary, Octal, Decimal, Hexadecimal
In our daily lives, we count using the decimal system (base 10), which uses ten unique digits (0-9). However, computers operate fundamentally differently. They rely on the binary system (base 2), using only two digits: 0 and 1. This is because computers are built from electronic switches that are either 'on' or 'off', perfectly mapping to these two states.
While binary is essential for computers, long strings of 0s and 1s can be difficult for humans to read and work with. This is where other number bases like octal (base 8) and hexadecimal (base 16) come in. They act as convenient shorthand for binary, making it easier to represent and understand large binary numbers. Our Number Base Converter allows you to effortlessly switch between these systems, showing you the equivalent value in all four bases simultaneously, along with clear, step-by-step conversion methods.
The four bases at a glance
Binary
0, 1
Inside every computer and digital device — all data is ultimately stored as 0s and 1s
Octal
0 – 7
Unix file permissions, early computing systems, convenient shorthand for binary groups of 3
Decimal
0 – 9
Everyday counting — the system everyone learns at school
Hexadecimal
0 – 9, A – F
Colours (#FF5733), memory addresses, CSS, HTML, debugging — groups 4 binary bits neatly
Common mistakes to avoid
- Thinking hexadecimal A is 11, B is 12, etc:People often start counting from 1 for the letters after 9, rather than continuing the sequence from 0-9. Hexadecimal A represents the decimal value 10, B is 11, C is 12, D is 13, E is 14, and F is 15. There are 16 unique digits in total.
- Incorrectly assigning place values when converting from a base to decimal, e.g., reading powers from left to right starting at base^0:Positional notation dictates that the rightmost digit always corresponds to base^0, and powers increase as you move left. When converting from any base to decimal, the rightmost digit is multiplied by base^0, the next by base^1, and so on. For example, binary 101 = (1 2^2) + (0 2^1) + (1 * 2^0) = 4 + 0 + 1 = 5.
- Converting binary 11011 to hexadecimal by grouping as '11' and '011' (3 and 3):Binary digits must be grouped in fours (for hex) or threes (for octal) starting from the right. Leading zeros must be added to the leftmost group if it doesn't have enough digits. To convert binary 11011 to hexadecimal, group in fours from the right: 0001 1011. Then convert each group: 0001 is 1, 1011 is B. So, 11011 binary is 1B hexadecimal.