IPv6 Address Validation
This page provides a validator for IPv6 address formats. Enter the IPv6 address below, and press Tab. The result below will indicate whether it's a valid and properly formatted IPv6 address.
Best Text Representation of IPv6 Address
The draft IETF RFC A Recommendation for IPv6 Address Text Representation describes a preferred text representation for an IPv6 address. These sensible rules make the address lower-case, trim leading zeroes, shorten runs of zero segments (e.g. :0000:) as much as possible but not a single segment, and place the compressed zeros as far to the left as possible. The best representation is shown below.
About this page
The text of the script has a number of test cases that were used during development. Please let us know (firstname.lastname@example.org) if you find interesting test cases. Please feel free to use this code: we'd love to have a link to http://www.intermapper.com or this tech note.
IPv6 Test Cases
This Perl test script has over 200 test cases of valid and invalid IPv6 addresses. You can use them to test your own implementation. In addition it has pointers to several other regular expressions that can be used for IPv6.
[Updated 25 Feb 2010 to add info about Perl test script]