Number Base Converter
Number Input
Base 10 (0-9)
Enter a valid number for the selected base
Enter a number and click Convert to All Bases
Let us know
Please share your experience
4.9 (2.8k ratings)
About Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal. Instant conversion with reference table. Free online tool.
How to Use
Step 1
Select the input base: Binary (2), Octal (8), Decimal (10), or Hexadecimal (16)
Step 2
Enter your number in the input field (valid characters depend on base)
Step 3
Click 'Examples' to load pre-made numbers for quick testing
Step 4
Click 'Reference' to view common conversions table (0-1024)
Step 5
Click 'Convert to All Bases' to see results in all four bases
Step 6
View conversion information showing input base, value, and decimal equivalent
Step 7
Click 'Copy' next to any result to copy to clipboard
Step 8
Use the copied values in your programming, homework, or projects
Features & Benefits
- ✅Convert between 4 number bases: Binary, Octal, Decimal, Hexadecimal
- ✅Input any base and convert to all bases simultaneously
- ✅Automatic input validation for selected base
- ✅Binary (Base 2): digits 0-1
- ✅Octal (Base 8): digits 0-7
- ✅Decimal (Base 10): digits 0-9
- ✅Hexadecimal (Base 16): digits 0-9, A-F
- ✅Common conversions reference table with 15 rows (0 to 1024)
- ✅5 number examples: binary, octal, decimal, hexadecimal, large binary
- ✅Shows input base, input value, and decimal equivalent
- ✅Individual copy buttons for each base result
- ✅Real-time validation with error messages
- ✅Handles large numbers (up to JavaScript's safe integer limit)
- ✅Uppercase hexadecimal output (A-F, not a-f)
- ✅100% browser-based - numbers never sent to server
- ✅100% free - no limits, no signup required
FAQs
What are number bases?
Number bases (or radix) are different ways to represent numbers. Binary (base 2) uses 0-1, Octal (base 8) uses 0-7, Decimal (base 10) uses 0-9, and Hexadecimal (base 16) uses 0-9 and A-F. Computers use binary internally, while hexadecimal is common in programming for colors, memory addresses, and compact representation.
Why do programmers use different bases?
Binary represents how computers store data (bits: 0 or 1). Hexadecimal is compact and easy to convert to/from binary (each hex digit = 4 bits), making it perfect for memory addresses, colors (#FF00AA), and debugging. Octal was historically used in Unix file permissions (chmod 755). Decimal is what humans naturally use.
How do I convert between bases manually?
To convert to decimal: multiply each digit by base^position and sum. To convert from decimal: repeatedly divide by target base and collect remainders. For example, binary 1010 to decimal: (1×8)+(0×4)+(1×2)+(0×1) = 10. This tool does it instantly for you!
What characters are valid for each base?
Binary (base 2): only 0 and 1. Octal (base 8): 0-7. Decimal (base 10): 0-9. Hexadecimal (base 16): 0-9 and A-F (or a-f, case insensitive input). The tool validates your input and shows an error if you use invalid characters for the selected base.
Can I convert negative numbers?
This tool currently supports positive integers only. Negative numbers in different bases require signed number representations like two's complement (for binary), which is more complex. For most use cases (colors, addresses, simple conversions), positive integers are sufficient.
What's the largest number I can convert?
The tool can handle numbers up to JavaScript's safe integer limit (2^53 - 1, or 9,007,199,254,740,991 in decimal). This is large enough for most practical purposes. Larger numbers may lose precision due to JavaScript's number representation.
Why is hexadecimal used for colors?
Hexadecimal is perfect for colors because each color channel (Red, Green, Blue) uses 8 bits (0-255 in decimal, 00-FF in hex). A color like #FF00AA means: Red=FF (255), Green=00 (0), Blue=AA (170). It's compact and easy to read once you're familiar with it.
What are the examples for?
Click 'Examples' to load pre-made numbers: Binary (11010110 = 214), Octal (755 = 493), Decimal (1024), Hexadecimal (FF00AA = 16711850, a color code), and Large Binary (1111111111111111 = 65535). Great for learning or testing the converter.
What's in the reference table?
The reference table shows common conversions for 15 decimal numbers (0, 1, 2, 8, 10, 15, 16, 32, 64, 100, 128, 255, 256, 512, 1024) in all four bases. These are frequently used values in programming (powers of 2, byte boundaries, etc.). Click 'Reference' to view it.
Can I use this for homework or exams?
Yes! This tool is perfect for checking your work on computer science or math homework. However, we recommend learning the manual conversion process first, then using this tool to verify your answers. Understanding how base conversion works is important for programming and computer science.
Is my data secure?
Yes! All number conversions happen entirely in your browser using JavaScript. Your numbers never leave your device and are not sent to any server, ensuring complete privacy and security.