Binarios.org

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

Example: 192.168.1.1

Range: 0 to 4294967295

Reset Diagnostics Run self-tests

Self-Test Results

Input Expected Actual Status
0.0.0.0 0 0 PASS
0.0.0.1 1 1 PASS
127.0.0.1 2130706433 2130706433 PASS
192.168.1.1 3232235777 3232235777 PASS
255.255.255.255 4294967295 4294967295 PASS
0 0.0.0.0 0.0.0.0 PASS
1 0.0.0.1 0.0.0.1 PASS
2130706433 127.0.0.1 127.0.0.1 PASS
3232235777 192.168.1.1 192.168.1.1 PASS
4294967295 255.255.255.255 255.255.255.255 PASS

Passed: 10 / 10

Common IPv4 to Integer Examples

IPv4 address Unsigned integer Hexadecimal
0.0.0.000x00000000
0.0.0.110x00000001
10.0.0.11677721610x0A000001
127.0.0.121307064330x7F000001
192.168.1.132322357770xC0A80101
255.255.255.25542949672950xFFFFFFFF

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.

Related Binary and Networking Tools