March 26, 20264 min read

IP Address Converter Calculator

Convert IP addresses between dotted decimal, binary, hexadecimal, and integer formats. Supports both IPv4 and IPv6 with instant conversion.

networking ip address binary converter calchub
Ad 336x280

Most of us think of IP addresses as four numbers separated by dots. But networking hardware, databases, and low-level code work with IPs as 32-bit integers or hexadecimal strings. Knowing how to move between these representations — and having a tool to do it instantly — saves real time when you're debugging a firewall rule, inspecting a packet capture, or decoding an obfuscated URL.

The Four Representations

An IPv4 address is fundamentally a 32-bit number. The representations are:

FormatExample (8.8.8.8)Where you see it
Dotted decimal8.8.8.8Everywhere
Binary00001000.00001000.00001000.00001000Subnetting education, bit masks
Hexadecimal0x08080808Packet captures, registry values
Integer (decimal)134744072Databases, some APIs, URL encoding
The CalcHub IP Converter accepts any of these formats and converts to all others simultaneously. Paste a hex address from Wireshark, get the dotted decimal. Enter a database integer, see the human-readable form.

IPv6 Conversion

IPv6 is 128 bits, usually written in eight groups of four hex digits: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. It has two shortcuts that make it harder to parse:

  • Leading zeros suppression: 0db8 can be written as db8
  • Double colon compression: a sequence of all-zero groups can be replaced with :: once per address
So 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. The converter handles both compressed and expanded forms, shows the full 128-bit hex string, and calculates the integer value.

Obfuscated URL Detection

One security use case: attackers sometimes encode IP addresses in non-standard formats in phishing links to evade URL scanners. A URL like http://134744072/login is actually http://8.8.8.8/login. The integer format 0x08080808 also resolves in many browsers. The IP converter will decode these, which is useful in security investigations.

Practical Use Cases

Database storage: Storing IPs as 32-bit integers instead of VARCHAR(15) strings is more efficient and enables fast range queries. If you have an integer from the database and need to display it, convert it here. Routing table analysis: Routing entries in ip route show output or Cisco IOS are in dotted decimal, but kernel-level routing tables store binary representations. Understanding the binary helps when debugging wildcard masks in access control lists. APIPA / Link-local addresses: 169.254.x.x addresses show up when DHCP fails. Knowing that 169.254.0.0 = 10101001.11111110.00000000.00000000 in binary (and the /16 mask means only the first 16 bits are network) helps you understand why they can't route beyond the local segment.
IP RangePurposeInteger Range
10.0.0.0/8Private (Class A)167,772,160 – 184,549,375
172.16.0.0/12Private (Class B)2,886,729,728 – 2,887,778,303
192.168.0.0/16Private (Class C)3,232,235,520 – 3,232,301,055
127.0.0.0/8Loopback2,130,706,432 – 2,147,483,647
169.254.0.0/16Link-local (APIPA)2,851,995,648 – 2,852,061,183

Tips

  • 127.0.0.1 is not the only loopback. Any address in 127.0.0.0/8 loops back. Some applications (and exploits) use 127.0.0.2 or higher addresses in this range.
  • 0.0.0.0 is not nothing. As a source address it means "this host." As a route destination it means "default route." As a bind address it means "all interfaces."
  • The max IPv4 address is 255.255.255.255 = 4,294,967,295 as an integer, which also explains why IPv4 ran out: just over 4 billion unique addresses for the entire planet.

Why do some databases store IP addresses as integers?

Integer comparison (WHERE ip >= 167772160 AND ip <= 184549375) is much faster than string comparison for IP range lookups. It also uses 4 bytes instead of up to 15. If you're building a GeoIP lookup table or access control list, integer storage is the right choice.

How do I convert an IPv6 address to its full uncompressed form?

The CalcHub converter expands all :: groups and zero-pads each group to 4 digits automatically, giving you the full 32 hex character representation.

What's the difference between :: and ::1 in IPv6?

:: is all zeros — the unspecified address (equivalent to IPv4's 0.0.0.0). ::1 is the loopback address (equivalent to 127.0.0.1). Both compress multiple zero groups using the double-colon notation.
Ad 728x90