Free tech learning for everyone, from basics to pro

IPv4 converter

Convert an IPv4 address to binary, hexadecimal and a 32-bit number, and back.

Runs on your device · nothing is uploaded

Why convert IP addresses?

Routers and firewalls see an IPv4 address as one 32-bit number. Seeing it in binary makes subnetting easy to follow, hexadecimal appears in packet captures, and some logs and databases store addresses as plain integers.

You can type a dotted address (192.168.1.10), a whole number (3232235786) or hex (0xC0A8010A).

A worked example

192.168.1.10 in binary is 11000000.10101000.00000001.00001010. Read as one 32-bit number it is 3,232,235,786, which is 0xC0A8010A in hex. To work out the whole number yourself: first octet × 16,777,216 + second × 65,536 + third × 256 + fourth. Here that is 3,221,225,472 + 11,010,048 + 256 + 10.

Where you see these formats

  • Binary: subnetting. A subnet mask is a run of 1 bits followed by 0 bits, and the network address is where the host bits are all 0.
  • Hex: packet captures in Wireshark and some router debug output.
  • Integers: databases and log tools often store addresses as numbers, because ranges are easy to compare: an address is inside a subnet if its number is between the network and broadcast numbers.

Quick questions

Why does 0.0.0.0 to 255.255.255.255 equal 0 to 4,294,967,295?

Because IPv4 addresses are 32 bits long, and 232 is 4,294,967,296 values.

Can I enter an address with leading zeros, like 192.168.001.010?

Avoid it. Some systems read a leading zero as an octal (base-8) number, which changes the address. Attackers have used this trick to get past filters.

Practise the binary skills with our subnetting step-by-step note.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown