What this converter does
It maps an IPv4 address between its familiar dotted-quad form and the single 32-bit unsigned integer that represents the same four bytes. Both directions are supported, and the hexadecimal equivalent is shown alongside every result.
How it works
An IPv4 address is just four bytes. Reading them most-significant first (big-endian), the integer value is a·2^24 + b·2^16 + c·2^8 + d. The tool computes this by walking the four octets, multiplying the running total by 256 and adding each octet. To go the other way, it peels the integer apart with division and modulo by 256 to recover each octet.
192.168.1.1 → 192×16777216 + 168×65536 + 1×256 + 1 = 3232235777
3232235777 → 3232235777 ÷ 16777216 = 192 remainder ... → 192.168.1.1
Both octet validation (0–255, exactly four parts) and range validation (0 to 4294967295) run before any conversion, so malformed input is caught rather than silently producing a wrong answer.
Worked examples
| Dotted-quad | Decimal | Hexadecimal |
|---|---|---|
| 192.168.1.1 | 3232235777 | 0xC0A80101 |
| 10.0.0.1 | 167772161 | 0x0A000001 |
| 172.16.0.1 | 2886729729 | 0xAC100001 |
| 255.255.255.255 | 4294967295 | 0xFFFFFFFF |
| 0.0.0.0 | 0 | 0x00000000 |
The private RFC 1918 ranges map to predictable integer blocks: 10.x.x.x covers 167772160–184549375, and 192.168.x.x covers 3232235520–3232301055.
When you need this conversion
Database storage: Most SQL databases offer a more compact and index-friendly way to store IP addresses as integers rather than strings. A 4-byte integer column uses a quarter the space of a text column and enables range scans without string parsing. MySQL’s INET_ATON() and INET_NTOA() functions do exactly this conversion; this tool lets you verify or prepare values without a database connection.
Subnet arithmetic: Checking whether an IP falls inside a subnet is cleaner in integer arithmetic. 10.5.0.0/16 as a range is simply 167837696 to 167903231 — a straightforward greater-than/less-than check rather than string parsing across four octets.
Firewall and ACL rules: Some network appliances, especially older ones, accept rules specified as decimal integers in their config files. Converting a familiar address to its decimal form helps write and verify those rules.
Packet captures: In low-level packet captures (pcap files), IP addresses appear as raw bytes in big-endian order. The hex form shown by this tool matches the byte sequence directly, making it easy to confirm you are looking at the right address in a hex dump.
Verifying your own IP in decimal
If you look up your public IP (for example 93.184.216.34, the IP of example.com), the decimal form is 93×16777216 + 184×65536 + 216×256 + 34 = 1,559,149,090. The hexadecimal is 0x5DB8D822. This sort of quick verification is useful when cross-referencing firewall logs, block lists, or CDN access rules that express IP ranges in integer form.
Notes
This tool covers IPv4 only. IPv6 uses 128-bit addresses and cannot fit in a 32-bit integer — use the IPv6 expander tool for those. All conversion runs in your browser; no addresses are uploaded.