IPv4 to Integer Converter — Addresses as 32-Bit Numbers
Convert dotted IPv4 addresses into a single 32-bit unsigned decimal integer.
| Input | 32-bit integer | Hex |
|---|---|---|
192.168.1.1 | 3232235777 | 0xC0A80101 |
10.0.0.254 | 167772414 | 0x0A0000FE |
8.8.8.8 | 134744072 | 0x08080808 |
100.64.12.7 | 1681918983 | 0x64400C07 |
203.0.113.45 | 3405803821 | 0xCB00712D |
255.255.255.0 | 4294967040 | 0xFFFFFF00 |
When to use the IPv4 Address to 32-Bit Unsigned Integer Converter
Stored compactly in databases
Storing addresses as unsigned integers takes only 4 bytes and makes range lookups, such as IP geolocation, far faster than comparing text.
Same as INET_ATON
The result matches MySQL's INET_ATON and PHP's ip2long, so it can be used to check data already stored.
Correct address order
Sorting addresses as text puts 10.0.0.100 before 10.0.0.20. As numbers, the order is always right.
Long lists at once
Paste thousands of addresses from logs and download the converted list to import into a spreadsheet or database.
Frequently asked questions
What is the formula?
First octet times 16,777,216 (2 to the 24th), second times 65,536 (2 to the 16th), third times 256, plus the fourth octet. For example 192.168.1.1 becomes 3232235777.
What is the largest value?
255.255.255.255 equals 4,294,967,295, which is 2 to the power 32 minus one.
Can a browser open an address written as a number?
Yes: http://3232235777/ opens as 192.168.1.1. Attackers sometimes use this to disguise links, so be wary of URLs made of long numbers.
What about the reverse?
Use the Integer to IPv4 converter. It accepts numbers from 0 to 4,294,967,295 per line and shows the address with its hex form, which suits checking number columns in a database.
Is my data sent to a server?
No. Conversion happens in your browser, so pasted customer address lists or server logs never leave your device and are not stored anywhere.
Similar tools
- 32-Bit Unsigned Integer to IPv4 Address ConverterConvert a 32-bit integer (e.g. 3232235777) back into standard IPv4 notation.
- 32-Bit Binary Octets to Dotted-Decimal IPv4 ConverterConvert 32-bit binary bitstreams or dotted binary octets back into IPv4.
- IPv4 Address to Hexadecimal (0x) ConverterConvert IPv4 octets into dotted hex and 32-bit hex (for DHCP Options & /proc).
- Hexadecimal (0x) to Dotted-Decimal IPv4 ConverterDecode hex bytes from packet dumps, /proc/net/tcp or DHCP logs back into IPv4.