Everyday Tools
Binary / Hex / Decimal Converter
Enter a number in any base and see it written in the others at once.
Calculation inputs
Whole numbers only — pick the base your input is written in.
Results
No result yet
Complete the fields and select Calculate to show results here.
About this calculator
This converter takes a number written in binary, octal, decimal, or hexadecimal and shows its equivalent in the other bases at once. It is a common reference for students, programmers, and anyone working with computer memory or color codes.
How the calculation works
- The input is parsed from its chosen base into a decimal value
- That decimal value is then written out in base 2, base 8, and base 16
- Hexadecimal digits run 0–9 then A–F
Notes and assumptions
Only whole numbers are supported; fractional and negative values are outside the standard base notation used here.
How it works in plain English
A number base describes how many unique digits are available before a new place value is needed. Decimal, the everyday system, uses ten digits (0-9). Binary uses just two (0-1), octal uses eight (0-7), and hexadecimal uses sixteen, borrowing letters A through F to represent 10 through 15.
To convert, the input is first read according to its stated base and converted internally into an ordinary decimal number — for example, binary 1111 becomes decimal 15. From that single decimal value, the converter then rewrites the number in each of the other bases, dividing repeatedly by the target base and reading off the remainders.
Hexadecimal is especially common in computing because two hex digits map cleanly onto one byte (8 bits), making it a compact way to write binary data such as colors, memory addresses, or error codes. This tool only handles whole, non-negative numbers, since fractional and negative values are outside standard base notation.
Worked example
Entering 255 in decimal converts to 11111111 in binary, 377 in octal, and FF in hexadecimal — a common value because it is the maximum a single byte can hold. Going the other direction, entering FF and selecting hexadecimal as the input base returns 255 in decimal. This pairing shows up constantly in web design, where a color like #FFFFFF (pure white) is really three bytes of 255 each, one for red, green, and blue. By comparison, entering 128 in decimal — the midpoint of a byte's range — converts to 10000000 in binary, 200 in octal, and 80 in hexadecimal, showing how the same quantity can look very different depending on which base is used to write it down. Recognizing these equivalents helps when reading hardware documentation or debugging color values that mix hex codes with plain decimal numbers.
Decimal, binary, octal, and hexadecimal equivalents
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
Frequently asked questions
Why does hexadecimal use letters as digits?
Hexadecimal needs sixteen distinct digit symbols, but our number system only has ten (0-9). To fill the gap, it borrows A through F to stand in for 10 through 15. So counting in hex goes ...8, 9, A, B, C, D, E, F, 10, continuing the pattern smoothly once you know the letters' values.
Can this convert negative numbers or decimals with fractions?
No, this tool works with whole, non-negative numbers only. Representing negative numbers and fractions in other bases involves additional conventions, such as two's complement for negatives or a base point for fractions, which fall outside the standard whole-number notation this converter handles.
Why do programmers use hexadecimal instead of binary directly?
Hexadecimal is far more compact — one hex digit represents four binary digits, so a long binary string becomes much shorter and easier to read and type correctly. Since it maps evenly onto bytes and nibbles, it remains the practical shorthand for memory addresses, color codes, and low-level data.
What is the largest number this converter can handle?
It is limited to values that JavaScript can represent as a safe whole number, which is about 9 quadrillion (2^53 - 1). Numbers beyond that range may lose precision during conversion, so extremely large values are outside the practical scope of this tool.
Related tools
Upper, lower, title, and sentence case with copy.
Random numbers in any range, with or without repeats.
Monthly payment and total interest on a fixed-rate loan.
Percent of a number, percent share, and percent change.