Number Base Converter
Number bases, or radixes, are the foundations of how numbers are represented. While most people work with decimal (base 10) numbers in daily life, computer systems and programming languages use other bases to represent data efficiently. Binary (base 2) is fundamental to computing, representing all data as sequences of 0s and 1s. Octal (base 8) and hexadecimal (base 16) are convenient shorthand for binary data. Hexadecimal is particularly important in programming, web design, and computing: colour codes use hexadecimal (#FF5733), memory addresses are typically written in hexadecimal, and binary data is often encoded in hexadecimal for readability. This calculator converts integers between four common bases: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Type a number in any base and the others update instantly. The calculator handles positive integers and shows a reference table of 0 through 15 in all four bases for quick comparison. Use this tool to understand number systems, verify programming calculations, or convert between bases when working with computer architecture, digital electronics, or web design.
Reference table: 0-15 in all bases
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
Number base converter: frequently asked questions
What are number bases?
A number base (or radix) is the number of digits used in a positional numeral system. Decimal (base 10) uses digits 0-9 and is standard in daily life. Binary (base 2) uses 0-1 and is fundamental to computing. Octal (base 8) uses 0-7 and is used in some programming contexts. Hexadecimal (base 16) uses 0-9 and A-F and is widely used in programming and design.
Why is hexadecimal used in programming?
Hexadecimal is convenient for representing binary data because each hexadecimal digit represents exactly 4 binary digits (bits). This makes it easy to read and write large binary numbers. Hexadecimal is widely used for color codes (e.g., #FF5733), memory addresses, and data encoding.
How do I convert a decimal number to binary?
Repeatedly divide by 2 and track the remainders. Read the remainders from bottom to top. For example, 13 divided by 2 is 6 remainder 1, 6 by 2 is 3 remainder 0, 3 by 2 is 1 remainder 1, and 1 by 2 is 0 remainder 1, giving 1101 in binary. This converter does this automatically.
What is the largest number this converter can handle?
This converter handles positive integers. Very large numbers may lose precision due to JavaScript number limits. For most practical applications (values up to about 2^53), conversion is accurate.
What do binary, octal, and hexadecimal represent?
All number bases represent the same values, just using different digits. The decimal number 255 is 11111111 in binary, 377 in octal, and FF in hexadecimal. Each representation is equivalent; they are just different ways of writing the same number.
Official sources
- Wikipedia: Radix.
- Wikipedia: Hexadecimal.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.