IPv6 Validator

Validate IPv6 addresses (full and compressed formats)

Input IPv6 Addresses

Validation Results

Validation results will appear here

The IPv6 Validator performs comprehensive validation of IPv6 addresses across all valid representations: full 8-group hexadecimal notation, compressed :: shorthand, mixed IPv4-compatible format, and addresses with zone IDs. Enter an address like 2001:db8::1 or 2001:db8::1::2 and get an immediate valid/invalid result with the canonical form, error details, and address type classification (global unicast, link-local, ULA, multicast, or loopback).

Understanding IPv6 Address Syntax

IPv6 addresses are 128 bits long, written as eight groups of four hexadecimal digits separated by colons -- something like 2001:0db8:0000:0000:0000:0000:0000:0001. That is verbose enough that a shorthand notation was developed: you can drop leading zeros within each group and replace the longest consecutive sequence of all-zero groups with ::. So that same address becomes 2001:db8::1, which is much easier to read and type. The downside of this flexibility is that the same address can be written in many different ways, and not all of them are valid.

The rules for what constitutes a valid IPv6 address are defined primarily in RFC 4291, with canonical formatting guidelines in RFC 5952. The most common mistake is using :: twice in the same address. Since :: can represent any number of consecutive zero groups, allowing two :: sequences would make it impossible to determine how many groups each one replaces. The address 2001::1::2 is ambiguous -- does the first :: represent two zero groups and the second three, or vice versa? The RFC resolves this by allowing exactly one :: per address.

Other common errors include hexadecimal groups that exceed four digits (like ::12345), non-hex characters (like gggg), and incorrect group counts. When there is no :: compression, the address must contain exactly eight colon-separated groups. With ::, the total number of explicitly written groups plus the compressed groups must equal eight. This validator checks all of these rules and reports the specific error for any address that fails, making it easy to identify and fix the problem.

How to Validate an IPv6 Address

  1. Enter one or more IPv6 addresses in any valid notation format
  2. Click Validate to check each address against RFC 4291 and RFC 5952 formatting rules
  3. Review results showing valid/invalid status, the canonical form, and the specific error for any rejected addresses
  4. For valid addresses, see the address type (global unicast, link-local, multicast, loopback, etc.)

IPv6 Validation Examples

InputValidFormatNotes
2001:0db8:0000:0000:0000:0000:0000:0001YesFullAll 8 groups with leading zeros
2001:db8::1YesCompressedConsecutive zero groups collapsed
::1YesCompressedLoopback address
::YesCompressedUnspecified address (all zeros)
::ffff:192.168.1.1YesMixedIPv4-mapped IPv6 address
fe80::1%eth0YesWith zone IDLink-local with interface scope
2001:db8::1::2No--Multiple :: sequences not allowed
2001:db8:gggg::1No--gggg is not valid hexadecimal
2001:db8:1:2:3:4:5:6:7No--9 groups (maximum is 8)
2001:db8::12345No--Group exceeds 4 hex digits (max ffff)
2001:db8No--Only 2 groups without :: compression

IPv6 Address Type Classification

Address / PrefixTypeRFCUsage
::1/128LoopbackRFC 4291Local machine testing
::/128UnspecifiedRFC 4291Source before address assignment
2000::/3Global UnicastRFC 4291Public internet-routable addresses
fe80::/10Link-LocalRFC 4291Single link communication, auto-configured
fc00::/7Unique Local (ULA)RFC 4193Private networks (similar to RFC 1918)
ff00::/8MulticastRFC 4291One-to-many communication
::ffff:0:0/96IPv4-MappedRFC 4291IPv4 addresses embedded in IPv6
64:ff9b::/96NAT64 Well-KnownRFC 6052IPv4/IPv6 translation

When to Use the IPv6 Validator

  • Dual-stack configuration -- validate IPv6 addresses before adding AAAA records, firewall rules, or router configurations alongside existing IPv4 setup
  • Application development -- verify that user-submitted IPv6 input in web forms and APIs is syntactically correct before processing or storing it
  • Configuration file auditing -- scan configuration files for malformed IPv6 addresses that could prevent services from binding or connecting
  • Log parsing and data import -- filter valid IPv6 addresses from mixed data sources that may contain truncated or corrupted address strings
  • IPv6 transition planning -- validate addresses in migration plans to ensure they conform to the correct notation before deployment
  • Security policy review -- verify that IPv6 addresses in ACLs and security group rules are syntactically valid and of the expected type

How IPv6 Address Validation Works

Compression Rules (RFC 5952)

IPv6 addresses can be written in multiple equivalent ways. The validator accepts all valid forms and identifies the canonical representation:

  1. Leading zero suppression: 2001:0db8 can be written as 2001:db8
  2. Consecutive zero group compression: 2001:db8:0:0:0:0:0:1 can be written as 2001:db8::1
  3. Single :: only: only one :: sequence is allowed per address, because multiple would make the expansion ambiguous
  4. Leftmost longest run: when multiple equal-length zero runs exist, RFC 5952 recommends compressing the leftmost one

Zone ID Handling

Link-local addresses (fe80::/10) require a zone ID to specify which network interface they apply to, since the same link-local address can exist on multiple interfaces simultaneously. The zone ID follows a % separator:

fe80::1%eth0       (Linux interface name)
fe80::1%15         (Windows interface index)
fe80::1%en0        (macOS interface name)

The validator accepts zone IDs and validates them separately from the address portion. Zone IDs are only meaningful for link-local and multicast scoped addresses.

Practical Advice for IPv6 Validation

IPv6 validation in applications requires more thought than IPv4 because of the many valid representations. Two addresses that look completely different can be the same: 2001:0db8:0000:0000:0000:0000:0000:0001 and 2001:db8::1 are identical. If your application stores IPv6 addresses and needs to detect duplicates or perform lookups, always normalize to a canonical form before comparison. The best practice is to expand to full form for storage and comparison, then compress for display.

When validating user input in web forms, remember that browsers and operating systems sometimes include zone IDs in link-local addresses automatically. A user might paste fe80::1%eth0 from their terminal output. Your validator needs to handle the zone ID gracefully -- either accept and strip it, or accept and store it, depending on your use case. Rejecting zone IDs outright will frustrate users who are copying addresses from legitimate system output.

Be aware that IPv4-mapped addresses like ::ffff:192.168.1.1 are valid IPv6 but have security implications. Applications that accept IPv6 input and then extract the embedded IPv4 address should validate both parts. An attacker might craft a malicious IPv4-mapped address to bypass IPv4 validation checks in dual-stack applications. If your application does not need to handle IPv4-mapped addresses, consider rejecting them explicitly.

Frequently Asked Questions

Why does my IPv6 address with two :: fail validation?

The :: shorthand replaces one or more consecutive groups of all zeros. If two :: sequences were allowed, the parser could not determine how many zero groups each one represents. For example, 2001::1::2 could expand to multiple different valid addresses. The RFC mandates exactly one :: per address.

Is ::ffff:192.168.1.1 a valid IPv6 address?

Yes. This is an IPv4-mapped IPv6 address defined in RFC 4291. The ::ffff: prefix followed by a dotted-decimal IPv4 address is used by dual-stack applications to represent IPv4 connections within IPv6 data structures. The validator recognizes this mixed notation and validates both the IPv6 prefix and the embedded IPv4 portion.

What is the difference between :: and ::1?

:: is the unspecified address (all 128 bits are zero), equivalent to IPv4's 0.0.0.0. It is used as a source address before a device has been assigned an address. ::1 is the loopback address (127 zeros followed by a single 1 bit), equivalent to IPv4's 127.0.0.1. It is used for local machine communication.

Are uppercase hex digits valid in IPv6 addresses?

Yes, both 2001:DB8::1 and 2001:db8::1 are syntactically valid and represent the same address. However, RFC 5952 recommends lowercase for the canonical representation. This validator accepts both cases but may indicate the canonical form in lowercase.

How do I validate an IPv6 address with a prefix length like 2001:db8::/32?

This tool validates bare IPv6 addresses without prefix notation. To validate an address with a prefix length, use the IPv6 Subnet Calculator which accepts prefix notation and validates both the address and the prefix length.

Related Tools

IPparseβ€’Free Network & Subnet Calculator Tools

Β© 2026 IPparse. All tools run locally in your browser.

100% Privacy-First β€’ No Data Collected