IP ↔ Hex Converter

Paste an IPv4 or IPv6 address, a hex string, or a decimal integer — the direction is detected and every representation comes back at once. Everything runs in your browser; nothing is sent anywhere.

try:
Accepted: dotted IPv4, IPv6 (with ::), bare hex (c0a80101), 0x-prefixed hex, dotted or spaced hex bytes, and decimal integers.

Reading rules: input containing : is IPv6 and input with dots is IPv4 (else dotted hex); hex is read as an IPv4 address up to 8 digits (0x1 is 0.0.0.1) and as an IPv6 address up to 32; a pure-digit string of any other length is decimal, and when both readings are valid (8- and 32-digit strings) a toggle appears. IPv6 text is canonical (:: for the longest zero run, lowercase), and IPv4-mapped addresses show the embedded IPv4. An […] wrapper and a %zone suffix are ignored.