Convert Between Binary, Octal, Decimal & Hex

Every number we write lives in a base: base 10 is everyday counting, base 2 is the language of bits, base 16 is the readable form of bytes (think #ff8800 or a memory address) and base 8 shows up in Unix file permissions. This converter reads the number in the base you pick and shows the same value in all four; bases 2, 8 and 16 are written in upper case so the digits stay distinct. If a digit does not exist in that base, a 2 in base 2, or a G in base 16, you get an error instead of a wrong answer. Conversion covers whole numbers only; fractional parts and negatives are not supported.

This tool runs entirely in your browser. No data is sent to any server.

How to use it

  1. 1

    Type the number into the first box.

  2. 2

    Choose the input base from the menu: 2, 8, 10 or 16.

  3. 3

    Read all four equivalents in the list below and copy the one you need.

Frequently asked questions

What is hexadecimal good for?

Each hex digit is exactly four bits, so two digits describe a whole byte. That is why colors, memory addresses and hash output are written in hex.

Why is my input rejected?

Most likely a digit that does not exist in that base. Base 2 allows only 0 and 1, base 8 uses 0 to 7, and base 16 uses 0 to 9 plus A to F.

Can it convert fractions or negative numbers?

No. This version reads positive whole numbers only. For a negative value, convert the magnitude and add the sign yourself.