IP Address Converter

Convert IPv4 and IPv6 addresses to decimal integers, hexadecimal, binary, or octal. Expand or compress IPv6 and convert numbers back to IP addresses.

Result
—

How to calculate

Read an IPv4 address as four bytes and an IPv6 address as eight 16-bit groups. Join the groups in network byte order and write the resulting unsigned integer in the selected base.

Worked example

Use Input format IPv4 or IPv6 address · IP address or unsigned number 192.0.2.1 · IP version for numeric input IPv4 (32 bits). The result is 192.0.2.1.

Input and result notes

Address input detects IPv4 or IPv6 automatically. For numeric input, choose the bit width. Hex, binary, and octal can have 0x, 0b, and 0o prefixes. For CIDR ranges, use the IP Subnet Calculator.

IETF recommendations for IPv6 address notation

Related calculators