Free tool

Binary / decimal / hex converter

Type a number in decimal, binary or hexadecimal: an octet, a whole IPv4 address or a 32-bit number. See it in all three bases, with the place-value table and the working step by step.

The tool

How the conversion works, in short

  1. An octet has 8 bits, worth 128, 64, 32, 16, 8, 4, 2 and 1 from left to right.
  2. Decimal to binary: subtract the largest value that fits, one at a time. 77 = 64 + 8 + 4 + 1, so 01001101.
  3. Binary to decimal: add the values of the positions that hold a 1. 11000000 = 128 + 64 = 192.
  4. Binary to hex: split the octet into two groups of 4 bits and write each group as one hex digit. 0100 1101 = 4D.

The binary you need for subnetting is also covered in the guide Subnetting explained step by step.

Frequently asked questions

What can this converter handle?

A single octet (0–255), a whole IPv4 address written in decimal, binary or hex, and any 32-bit number (for example 3232235777 or 0xC0A80101). The result is shown in all three bases.

How do I convert decimal to binary quickly?

Start at 128 and subtract 128, 64, 32, 16, 8, 4, 2 and 1 in turn whenever they fit. Write 1 where you subtracted and 0 where you did not. For example 200 = 128 + 64 + 8, which is 11001000.

Why does binary matter for the CCNA?

Masks, network addresses and broadcasts only really make sense in binary: the network/host boundary is a number of bits. In the exam you convert by hand, so practise until it becomes automatic.

What does one hex digit represent?

One hex digit (0–9 and A–F) is exactly 4 bits, from 0000 to 1111. That is why an octet takes two hex digits, and why IPv6 and MAC addresses are written in hex.

Are the numbers I type sent anywhere?

No. Everything is converted in your browser, and nothing leaves your device.

Practise conversions every day

The Routerel trainer gives you endless binary and hex conversions, plus subnetting and 1,900+ CCNA questions with explanations.

Try 7 days freeSee the app