IP address converter
Convert an IPv4 address between dotted decimal, a 32-bit integer, binary, hexadecimal, and octal. Paste any form and get all the others.
Enter any form and SubnetKit shows all the others.
One address, many representations
An IPv4 address is really just a 32-bit number, and 192.0.2.1 is only the human-friendly way to write it. Underneath, it is the integer 3221225985, the hex value 0xC0000201, and the binary 11000000.00000000.00000010.00000001. They are all the same value in different bases.
You reach for these conversions when code stores addresses as integers, when a packet capture shows hex, or when you are working out which bits a mask covers. This converter accepts any of the forms and shows the rest, so you never have to do the arithmetic by hand. To see the network and host split of an address, use the subnet calculator.
Frequently asked questions
How do I convert an IP address to a 32-bit integer?
Multiply each octet by its place value: octet1 x 16777216 + octet2 x 65536 + octet3 x 256 + octet4. 192.0.2.1 becomes 3221225985. This tool does it in both directions instantly.
How do I convert an IP to binary?
Write each octet as 8 bits. 192 is 11000000, 0 is 00000000. So 192.0.2.1 is 11000000.00000000.00000010.00000001. Paste any IP above to see it.
What is an IP address in hexadecimal?
It is the 32-bit value in base 16. 192.0.2.1 is 0xC0000201. Hex is handy in packet captures and low-level code where addresses are stored as integers.
Can I convert an integer back to an IP?
Yes. Paste the integer, hex value, or binary and the tool returns the dotted-decimal address plus every other representation.