Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
How to use the number base converter
- Choose the base of the number you're entering (binary, octal, decimal, or hex).
- Type the value.
- See the equivalent value in all four bases instantly.
Enter a number in binary, octal, decimal, or hexadecimal and instantly see it converted to all four number bases at once. Handy for programming, networking, or computer science homework.
Understanding number bases
A number base tells you how many digits are used. Decimal (base 10) uses 0–9, binary (base 2) uses only 0 and 1, octal (base 8) uses 0–7, and hexadecimal (base 16) uses 0–9 plus A–F for 10 to 15.
Each position is worth the base raised to a power. In binary, 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal. Programmers like hexadecimal because one hex digit equals exactly four binary digits, so 255 is 11111111 in binary and FF in hex.
Frequently asked questions
What characters are valid for hexadecimal?
Hexadecimal uses digits 0-9 and letters A-F (case-insensitive) to represent values 0 through 15 per digit.
Can I convert negative numbers?
This tool works with non-negative whole numbers. Negative number representations (like two's complement) depend on a fixed bit width, which is outside the scope of this simple converter.
How do I convert decimal to binary by hand?
Divide by 2 repeatedly and write down the remainders, then read them from bottom to top. 13 gives remainders 1, 0, 1, 1, so 13 is 1101.
Why is hexadecimal used for colors?
Each color channel ranges from 0 to 255, which fits exactly in two hex digits (00 to FF), so a color fits in six characters like #FF8000.