IP Address Converter
Free IPv4 address converter. Convert between dotted decimal, binary, hexadecimal, and 32-bit integer formats.
| Dotted decimal | |
| Binary | |
| Hexadecimal | |
| Integer (32-bit) |
How IPv4 address formats relate to each other
However it's written, an IPv4 address is the same 32-bit number underneath. Dotted decimal
(192.168.1.1) splits those 32 bits into four 8-bit bytes shown in decimal. Binary shows the raw
bits. Hex packs each byte into two hex digits. The integer form treats all 32 bits as one number, which is
how many low-level systems store an address internally.
Worked example: 192.168.1.1
Binary: 11000000.10101000.00000001.00000001. Hex: 0xC0A80101. As a 32-bit integer:
(192 Γ 256Β³) + (168 Γ 256Β²) + (1 Γ 256) + 1 = 3,232,235,777.
Frequently asked questions
How do I convert an IP address to binary?
Convert each of the four decimal octets to an 8-bit binary number and join them: 192.168.1.1 becomes 11000000.10101000.00000001.00000001. Each octet ranges from 0-255, which is exactly what 8 bits can represent (0 to 2βΈβ1).
How do I convert an IP address to a 32-bit integer?
Treat the four octets as the bytes of a single 32-bit number: multiply the first octet by 256Β³, the second by 256Β², the third by 256, add the fourth, and sum them. 192.168.1.1 becomes (192 Γ 16,777,216) + (168 Γ 65,536) + (1 Γ 256) + 1 = 3,232,235,777.
Why would I need to convert an IP address to hex or an integer?
Some systems and APIs (firewall rules, older router configs, certain database schemas, low-level networking code) store or display IP addresses as a raw hexadecimal value or a single integer instead of dotted decimal β this tool lets you go between whichever format you're working with.