A base converter changes a whole number between decimal, binary, octal and hexadecimal. Choose the base you are entering, then type the value, and it shows the number in all four bases at once. For example, the decimal number 255 is 11111111 in binary and FF in hexadecimal.
Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.
Saved results (0)
How to Use the Base Converter
- Choose the input base: decimal, binary, octal or hex.
- Enter the value in that base.
- Read the decimal result.
- See the binary and hexadecimal forms too.
Here is what each result means:
| Result | What it means |
|---|---|
| Decimal | The value in ordinary base 10. |
| Binary | The value in base 2, using 0 and 1. |
| Hexadecimal | The value in base 16, using 0 to 9 and A to F. |
What Is a Number Base?
A number base, or radix, is how many digits a counting system uses and what each place is worth. We normally count in base 10, decimal, with ten digits from 0 to 9, where each place to the left is worth ten times the one before. Computers, though, use other bases that suit how they store and process data.
Binary, base 2, uses only 0 and 1, matching the on-off states of electronic switches, so it is the native language of computers. Hexadecimal, base 16, uses 0 to 9 and then A to F for the values ten to fifteen; it is a compact way to write binary, since each hex digit stands for exactly four binary digits. Octal, base 8, uses 0 to 7 and appears in some older systems.
All of these are positional systems, so the same idea applies to each: the rightmost place is worth 1, and each place to the left multiplies by the base. Converting between them does not change the number itself, only how it is written. The decimal 255, the binary 11111111 and the hex FF are all the same value.
How Does the Base Converter Work?
It reads your value in the chosen base and rewrites it in the others.
- Your value is checked to make sure every digit is valid for the input base.
- It is read into an ordinary decimal number.
- That number is rewritten in binary, octal, decimal and hexadecimal.
For other number tools, see the Roman numeral converter and the scientific notation calculator.
Base Converter Example
Convert the decimal number 255.
Result: 255 is 11111111 in binary (eight ones), 377 in octal, and FF in hexadecimal. FF is compact because each F stands for four binary ones.
The Four Common Bases
Each base uses a different set of digits.
| Base | Name | Digits |
|---|---|---|
| 2 | Binary | 0, 1 |
| 8 | Octal | 0 to 7 |
| 10 | Decimal | 0 to 9 |
| 16 | Hexadecimal | 0 to 9, A to F |
Binary and hexadecimal pair up neatly: one hex digit equals exactly four binary digits, so hex is a short, readable way to write long binary strings. This is why hexadecimal is common in programming and colour codes.
Comparing How a Value Looks in Each Base
The same value is written very differently in each base.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
Higher bases pack the same value into fewer digits. That is why hexadecimal is popular for writing memory addresses and byte values, where a compact form is easier to read than a long row of ones and zeros.
What Affects the Converted Value
The Input Base
The same digits mean different values in different bases, so choosing the right input base is essential.
Valid Digits
Each base allows only certain digits; a 2 is not valid in binary, and a G is not valid in hex.
The Size of the Number
Very large numbers can lose exactness once they pass the safe integer limit.
When to Use a Base Converter
Programming
Convert between decimal, binary and hex when working with code or data.
Networking and Colours
Read hex colour codes or byte values in different bases.
Learning
See how the same number looks across counting systems.
Common Mistakes
1. Wrong Input Base
10 in binary is 2 in decimal, not ten. Always set the base you are entering.
2. Invalid Digits
Binary uses only 0 and 1; hex goes up to F. Other characters are not valid.
3. Confusing Hex Letters
In hex, A to F are digits for 10 to 15, not letters of a word.
4. Dropping Leading Zeros
Leading zeros do not change the value, but keep byte widths in mind when they matter.
5. Very Large Numbers
Beyond the safe integer limit, conversions may lose exactness.
Accuracy and Limitations
Conversions are exact for non-negative whole numbers within the safe integer range.
What it calculates accurately
- Conversion between decimal, binary, octal and hex
- Digit validation for the input base
- All four bases at once
What it does not do
- Handle negative numbers
- Convert fractions or decimals
- Work beyond the safe integer limit exactly
- Use bases other than 2, 8, 10 and 16
How We Convert Between Bases
Frequently Asked Questions
How do you convert decimal to binary?
Repeatedly divide by 2 and read the remainders from bottom to top. This converter does it for you: 255 in decimal is 11111111 in binary.
What is 255 in hexadecimal?
255 is FF in hexadecimal. Each F stands for 15, and the value is 15 times 16 plus 15, which is 255.
What digits does hexadecimal use?
Hexadecimal uses 0 to 9 and then A, B, C, D, E and F for the values 10 to 15, giving sixteen digits in all.
Why do computers use binary?
Binary matches the on-off states of electronic switches, so 0 and 1 map directly to off and on. Everything a computer stores is built from these two digits.
What is the difference between binary and hexadecimal?
Both are used in computing, but binary uses two digits and hex sixteen. One hex digit equals exactly four binary digits, so hex is a shorter way to write binary.
Can I convert from any base?
This tool converts between decimal, binary, octal and hexadecimal, the four most common bases. Choose which base you are entering from the toggle.
Does it handle negative numbers?
No. It converts non-negative whole numbers only. Negative numbers and fractions are outside its range.
What is octal used for?
Octal, base 8, groups binary digits in threes. It was common in older computer systems and still appears in some settings, such as file permissions.
Is my information saved?
No. The calculation runs in your browser and nothing you enter is stored or sent anywhere, unless you choose Save, which keeps the result only on this device.
Sources
- Radix (number base) (Wikipedia).
- Binary number (Wikipedia).
- Hexadecimal (Wikipedia).
Related Guides
Related Calculators
Looking for more converters?
Explore all convertersThis converter changes a whole number between decimal (base 10), binary (base 2), octal (base 8) and hexadecimal (base 16). Choose the base of your input and enter the value; hexadecimal uses the digits 0 to 9 and letters A to F. It handles non-negative whole numbers and shows the value in all four bases. Spotted an error? Let us know.
Creator
Shakeel Muzaffar is the Founder and Editor-in-Chief of MultiCalculators.com, bringing over 15 years of experience in digital publishing, product strategy, and online tool development. He leads the platform's editorial vision, ensuring every calculator meets strict standards for accuracy, usability, and real-world value. Shakeel personally oversees content quality, formula verification workflows, and the platform's commitment to publishing tools that are genuinely useful for students, professionals, and everyday users worldwide.
Areas of Expertise: Editorial Leadership, Digital Publishing, Product Strategy, Online Calculators, Web Standards




