Base Converter (binary · hex)

Enter a number and its base to see it in binary, octal, decimal and hex at once.

Binary
Octal
Decimal
Hexadecimal
Selected base
Size

🔒 Your input is never sent to a server.

How to use
  1. Type the number and choose which base it is written in. The 0x and 0b prefixes and spaces are ignored.
  2. Use the copy buttons next to each result. Negative numbers and very large numbers work too.
How base conversion works
  • A base-n number is the sum of each digit × a power of n. Example: binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11
  • To convert a decimal number to base n, divide by n repeatedly and read the remainders from the bottom up.
  • Digit values of 10 and above are written a=10, b=11, … z=35 (A–F in hexadecimal).
FAQ

Does it convert fractions such as 0.1?

This tool converts integers only. For the binary form of real numbers, use the IEEE-754 converter.

How large can the number be?

There is no digit limit and results are exact, though very long inputs may slow the browser.

How are negative numbers shown?

With a minus sign, as written. This is different from the two's-complement form used inside computers.

Results are for reference only and accuracy is not guaranteed. Terms & disclaimer