Home/IP ⇄ Binary Converter

IP address ⇄ binary converter

Convert an IPv4 address between dotted-decimal, binary, hexadecimal and a single 32-bit integer. Edit any field and the rest update live.

Per-octet breakdown

How an IPv4 address maps to binary

An IPv4 address is really a single 32-bit number. We write it as four octets (8-bit chunks) separated by dots only because it's easier to read. Each octet ranges 0–255, which is exactly what 8 binary bits can represent. So 192.168.1.10 becomes 11000000.10101000.00000001.00001010.

Why this matters

  • Subnetting works on the binary form — the subnet mask simply marks which bits are network vs host. See the subnet calculator.
  • Access lists and firewalls often match ranges using binary/wildcard logic.
  • Databases and code frequently store IPs as the single integer form for speed and compact indexing.

Worked example

192.168.1.10 → integer 3232235786 → hex C0.A8.01.0A. Each notation is just a different way of writing the same 32 bits.

Frequently Asked Questions

How do I convert an IP to a single number?

Multiply each octet by its place value: (a×16777216) + (b×65536) + (c×256) + d. For 192.168.1.10 that's 3,232,235,786. This tool does it instantly as you type.

Why would I store an IP as an integer?

Integers are compact and fast to compare and index, so databases often store IPv4 as a 32-bit unsigned number. Range queries (“is this IP in this block?”) become simple numeric comparisons.

What's the largest IPv4 integer?

255.255.255.255 = 4,294,967,295 (2^32 − 1). That's the total IPv4 address space, which is why we ran out and created IPv6. Expand IPv6 with the IPv6 expander.