Binary / Decimal / Hex Converter
Enter a number in binary, octal, decimal or hexadecimal and see it in all four bases at once. Input is validated for the base you pick, so an invalid digit gets a clear error instead of a wrong answer.
Your result will appear here
Converted values
Large numbers are converted exactly using BigInt, so values far beyond normal JavaScript number precision still come out right.
How to use
- Type the number you want to convert.
- Choose the base it is written in — binary, octal, decimal or hexadecimal.
- Click Convert to see the same number in all four bases.
Frequently asked questions
What are binary, octal and hexadecimal?
They are different ways of writing the same number. Binary (base 2) uses only 0 and 1, octal (base 8) uses 0–7, decimal (base 10) uses 0–9, and hexadecimal (base 16) uses 0–9 plus A–F.
Why do programmers use hexadecimal?
One hex digit represents exactly four binary digits, so hex is a compact way to write binary values — memory addresses, colour codes and byte values are usually shown in hex.
What happens if I type an invalid digit?
The tool checks your input against the base you selected — for example, the digit 2 is not valid in binary — and shows a clear error message instead of converting silently.
Does this work with very large numbers?
Yes. Conversion uses BigInt, so numbers with dozens of digits convert exactly, without the rounding that normal JavaScript numbers would introduce.