Binary, Hex & Decimal Converter

Convert a number between binary, octal, decimal and hexadecimal, with checks for invalid digits.

Converted values

In short

What is the Binary, Hex & Decimal Converter?

The binary, hex and decimal converter takes a whole number in base 2, 8, 10 or 16 and shows it in all four bases at once. It checks that every digit is valid for the base you chose and handles very large numbers. It is useful for programming, networking and electronics.

How to use it

  1. Type your number.
  2. Choose the base it is written in: binary, octal, decimal or hexadecimal.
  3. Read the value in every base.
  4. Copy the one you need.
Questions

Binary, Hex & Decimal Converter — FAQ

Can I include prefixes like 0x?

Yes. The prefixes 0x, 0b and 0o are accepted when they match the chosen base, and a leading minus sign is allowed.

Does it handle very large numbers?

Yes. It uses arbitrary-size integers, so values beyond the usual 53-bit limit convert exactly.

Why does it reject my number?

One of the digits is not valid in that base, for example the digit 2 in binary or the letter G in hexadecimal.

More Developer & Web tools