This section is copied from the "IP Version 6 Addressing Architecture" by R.Hinden and S. Deering <draft-ietf-ipngwg-addr-arch-03.txt>
There are three conventional forms for representing IPv6 addresses as text strings:
Examples:
FEDC:BA98:7654:3210:FEDC:BA98:7654:3210
1080:0:0:0:8:800:200C:417A
Note It is not necessary to write the leading zeros in an individual field, but there must be at least one numeral in every field (except for the case described in 2.).
For example the multicast address:
FF01:0:0:0:0:0:0:43
may be represented as:
FF01::43
The "::" can only appear once in an address. The "::" can also be used to compress the leading or trailing zeros in an address.
Examples:
0:0:0:0:0:0:13.1.68.3
0:0:0:0:0:FFFF:129.144.52.38
or in compressed form:
::13.1.68.3
::FFFF:129.144.52.38