Networks
How to convert a dotted IPv4 address to an integer and back
IPv4 can be represented as four octets or as an unsigned 32-bit integer; changing the representation does not change the address.
Before you start
Text is processed in the browser. Consider the content before using it and read the privacy policy.
PrivacyHow to use it
Enter 10.0.0.1 in the IPv4 field and convert.
Enter 167772161 in the integer field and convert back.
Compare the output with the original address.
Worked example
10 × 256³ + 0 × 256² + 0 × 256 + 1 = 167772161.
Result: 10.0.0.1 ↔ 167772161.
Limits and checks
The accepted integer range is 0 to 4294967295. The converter uses decimal, not hexadecimal or binary, and does not query or configure networks. Do not use leading zeroes in octets.
Next step
To check dotted decimal syntax first, use the IPv4 validator.
How to check the format of an IPv4 address