Home › Networking Tools › IP Address to Integer Converter
IP Address to Integer Converter
Convert an IPv4 address into its unsigned 32-bit decimal integer, or convert an integer back into dotted-decimal IPv4 notation. Inspect the binary and hexadecimal forms and learn how each octet contributes to the result.
IPv4 and Integer Converter
Diagnostics
| Check | Value |
|---|---|
| PHP version | 8.2.34 |
| Integer size | 8 bytes |
| Request method | GET |
| Request path | /ip-address-to-integer-converter |
| Conversion mode | ip_to_integer |
| Result available | No |
| Validation errors | 0 |
Common IPv4 to Integer Examples
| IPv4 address | Unsigned integer | Hexadecimal |
|---|---|---|
| 0.0.0.0 | 0 | 0x00000000 |
| 0.0.0.1 | 1 | 0x00000001 |
| 10.0.0.1 | 167772161 | 0x0A000001 |
| 127.0.0.1 | 2130706433 | 0x7F000001 |
| 192.168.1.1 | 3232235777 | 0xC0A80101 |
| 255.255.255.255 | 4294967295 | 0xFFFFFFFF |
Frequently Asked Questions
What is an IPv4 integer?
An IPv4 address consists of four 8-bit octets. These can be interpreted as one unsigned 32-bit number by weighting the octets according to their positions.
How is 192.168.1.1 converted to an integer?
The calculation is 192 × 16,777,216 + 168 × 65,536 + 1 × 256 + 1, giving 3,232,235,777.
Why can the result exceed 2,147,483,647?
IPv4 uses an unsigned 32-bit range. The maximum value is 4,294,967,295, which exceeds the maximum signed 32-bit integer. This implementation checks the range as a decimal string before converting it to a PHP integer.
Can I convert private IPv4 addresses?
Yes. Addresses such as 10.0.0.1, 172.16.0.1 and 192.168.1.1 are accepted. The conversion is mathematical and does not require the address to be publicly routable.
Does this tool support IPv6?
No. IPv6 addresses use 128 bits and require a different conversion range. This calculator is specifically for IPv4.