IPv6 to decimal converter
Convert an IPv6 address to its 128-bit decimal number, hex and binary, and back. Type it in any form and see all the others.
IPv6 2001:db8::1
read as IPv6 textExample: type your own address above.
Every form
- Compressed (RFC 5952)
- 2001:db8::1
- Expanded
- 2001:0db8:0000:0000:0000:0000:0000:0001
- No leading zeros
- 2001:db8:0:0:0:0:0:1
- Decimal (128-bit integer)
- 42540766411282592856903984951653826561
- Hex
- 0x20010db8000000000000000000000001
- Binary (by group)
- 0010000000000001:0000110110111000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000001
How it works
An IPv6 address is one 128-bit number, written as eight groups of four hex digits. 2001:db8::1 is the number 42540766411282592856903984951653826561. That's too big for most programming languages' normal integers, so databases store it as 16 bytes or as text.
The short form drops leading zeros in each group and replaces the longest run of zero groups with ::. The full form writes all 32 hex digits. Both mean the same address; the IPv6 expand and compress tool converts whole lists.
Addresses like ::ffff:192.0.2.1 are IPv4-mapped: the last 32 bits hold an IPv4 address. For IPv4 numbers, octal and the short forms browsers accept, use the IP to decimal converter.