IPv6 Test & 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 also shown above.

About this page

This page has a Javascript that tests an IPv6 address according to an elaborate regular expression (RE, or regex) for validation that the address is the proper. This regular expression is discussed further in InterMapper's Knowledge Base article which also includes a number of test cases. In addition, the Javascript on this page presents the "best text representation" according to IETF Draft RFC cited above.

The text of the script has a number of test cases that were used during development. Please let us know (support.intermapper@helpsystems.com) if you find interesting test cases. Please feel free to use this code: we'd love to have a link to http://www.helpsystems.com/intermapper 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.


Haven't tried InterMapper yet?

Start your free trial today