IP Address Converter Calculator
Convert IP addresses between dotted decimal, binary, hexadecimal, and integer formats. Supports both IPv4 and IPv6 with instant conversion.
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:
| Format | Example (8.8.8.8) | Where you see it |
|---|---|---|
| Dotted decimal | 8.8.8.8 | Everywhere |
| Binary | 00001000.00001000.00001000.00001000 | Subnetting education, bit masks |
| Hexadecimal | 0x08080808 | Packet captures, registry values |
| Integer (decimal) | 134744072 | Databases, some APIs, URL encoding |
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:
0db8can be written asdb8 - Double colon compression: a sequence of all-zero groups can be replaced with
::once per address
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 inip 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 Range | Purpose | Integer Range |
|---|---|---|
| 10.0.0.0/8 | Private (Class A) | 167,772,160 – 184,549,375 |
| 172.16.0.0/12 | Private (Class B) | 2,886,729,728 – 2,887,778,303 |
| 192.168.0.0/16 | Private (Class C) | 3,232,235,520 – 3,232,301,055 |
| 127.0.0.0/8 | Loopback | 2,130,706,432 – 2,147,483,647 |
| 169.254.0.0/16 | Link-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.2or 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.
Related Calculators
- Subnet Calculator — work with subnets once you understand IP representations
- Port Number Reference — complement IP knowledge with port reference
- Network Uptime Calculator — SLA and availability planning