IPv6 expand and compress
Write an IPv6 address in full, or in its shortest standard form (RFC 5952). Paste a list to convert many at once.
Forms
2001:db8::1Example: type your own address above.
- No leading zeros
- 2001:db8:0:0:0:0:0:1
How it works
An IPv6 address is 128 bits, written as eight groups of four hex digits separated by colons. The full (expanded) form always has all 32 digits, like 2001:0db8:0000:0000:0000:0000:0000:0001. It's easy to compare and sort, so logs and databases often use it.
The short form follows RFC 5952, so every address has exactly one way to be written:
- Letters are lowercase.
- Leading zeros in a group are dropped:
0db8becomesdb8, and0000becomes0. ::replaces the longest run of two or more zero groups. On a tie, it replaces the leftmost run:2001:db8:0:0:1:0:0:1becomes2001:db8::1:0:0:1.- A single zero group stays as
0and is never shortened to::.
:: can appear only once, because two would make it impossible to tell how many zeros each one stands for. To see an address as a number, use the IPv6 to decimal converter. For prefixes and ranges, use the IPv6 subnet calculator.