IPv6 Address Calculator
Expand a shorthand IPv6 address to its full form, or compress it to canonical shorthand — untangling the compact notation used to make IPv6's much longer addresses manageable.
Inputs
- IPv6 Address
Paste this into any page — the widget stays live and updates automatically as this calculator improves. Using WordPress or Notion? See the embed guide.
Saved Scenarios
— select 2+ to compare| Metric | |
|---|---|
Expanded (Full) Form
2001:0db8:0000:0000:0000:8a2e:0370:7334
Compressed (Canonical) Form
2001:db8::8a2e:370:7334
Spark says
Formula
- ::
- — Shorthand for one or more consecutive all-zero 16-bit groups
What is the IPv6 Address Calculator?
IPv6 addresses are 128 bits, written as eight 16-bit hex groups — the '::' shorthand collapses one run of consecutive zero groups for readability. This calculator converts between the full and compressed forms.
Use this when reading a network configuration or log file that uses IPv6 shorthand notation and want to see the full address, preparing an IPv6 address for a system that requires the expanded form, or verifying that two differently-written IPv6 addresses actually refer to the same address.
How to use it
- 1 Enter an IPv6 address, in either full or shorthand ('::') form.
Understanding IPv6 Address Calculator
IPv6 addresses are dramatically larger than their IPv4 predecessors — 128 bits compared to IPv4's 32 bits, expanding the total address space from roughly 4 billion addresses to a number so large (approximately 340 undecillion, a 3 followed by 38 zeros) that it's genuinely difficult to grasp intuitively, but the practical motivation was straightforward: IPv4's address space, while enormous when originally designed, proved insufficient for a world of billions of internet-connected devices, and IPv6 was designed with enough headroom that address exhaustion is not expected to be a practical concern for the foreseeable future.
This much larger address space, though, creates an immediate readability problem: a full IPv6 address, written out as eight groups of four hexadecimal digits separated by colons, is a genuinely unwieldy string for humans to read, write, and communicate accurately compared to IPv4's much shorter dotted-decimal notation. The IPv6 standard addresses this with two complementary shorthand conventions, both of which this calculator handles. Leading zeros within any individual 16-bit group can be omitted (so '0db8' can be written simply as 'db8'), and — the more significant compression — one single consecutive run of all-zero groups anywhere in the address can be collapsed entirely into a double-colon ('::'), letting an address with several zero groups in a row be written dramatically more compactly.
The restriction that only one '::' can appear in any given address is a deliberate, necessary design choice, not an arbitrary limitation — and understanding why reveals something genuinely important about how the notation actually works. If two separate '::' compressions were allowed in the same address, the notation would become fundamentally ambiguous: given a shorthand address with two '::' markers, there would be no way to determine how many zero groups each one individually represents, since the total number of omitted groups could be distributed between the two compression points in multiple different ways, all consistent with the same written shorthand. Restricting the standard to at most one '::' per address eliminates this ambiguity entirely — given any valid shorthand address, there's exactly one way to expand it back to its full 128-bit form, which is precisely the property that makes the compression reversible and therefore actually useful for real network configuration rather than just a lossy convenience notation.
A related canonicalization detail worth knowing: because IPv6 hexadecimal digits are technically case-insensitive (uppercase and lowercase hex digits represent identical values), and because zero-compression is optional in any address that contains zero groups (an address could technically be written with its zeros spelled out in full even if compression is available), the same underlying 128-bit address can be validly written in multiple different textual forms. RFC 5952 defines a specific 'canonical' representation — lowercase hex digits, leading zeros within each group omitted, and the longest possible run of consecutive zero groups compressed with '::' — specifically to give network documentation, logs, and configuration a single, consistent, unambiguous way to represent any given address, avoiding the confusion that could arise from the same address appearing differently in different contexts. This is exactly the distinction this calculator's 'expanded' versus 'compressed (canonical)' output represents — the fully spelled-out form useful for understanding the address's actual structure, and the canonical shorthand form that's the standard way to write it in practice.
Worked examples
Advantages
- •Handles the '::' zero-compression shorthand correctly in both directions.
- •Makes it easy to verify whether two differently-formatted IPv6 addresses are actually identical.
- •Useful for both learning IPv6 notation and practical network configuration tasks.
- •Clarifies exactly how many zero groups a given '::' shorthand represents in a specific address.
Limitations
- •Handles standard IPv6 notation only — doesn't currently parse embedded IPv4-mapped addresses (e.g. ::ffff:192.0.2.1) or zone/scope IDs (%eth0).
Common mistakes
- ⚠️ Assuming two IPv6 addresses that look textually different are necessarily different addresses, without checking their expanded forms, when they may represent the identical address written with different (but both valid) capitalization or compression choices.
- ⚠️ Attempting to use more than one '::' in a single address, which is invalid notation, since it would create ambiguity about how many zero groups each '::' instance represents.
- ⚠️ Manually miscounting zero groups when expanding or compressing an IPv6 address by hand, a common source of transcription errors given how many hexadecimal groups a full address contains.
Tips
- 💡 When comparing two IPv6 addresses for equality, always expand both to their full form first rather than comparing the shorthand text directly, since equivalent addresses can be written differently.
- 💡 Remember that only one '::' is ever valid in a single address — if you see two, the address is malformed.
- 💡 IPv6 hex digits are case-insensitive by the standard, but canonical (RFC 5952) notation conventionally uses lowercase — worth being consistent in documentation even though both cases are technically valid.
- 💡 When troubleshooting, expand a shorthand address to its full form to make it easier to visually compare against another address or a documented range.
Real-life uses
- Reading a network configuration or log file that uses IPv6 shorthand notation
- Preparing an IPv6 address for a system or format that requires the fully expanded form
- Verifying that two differently-written IPv6 addresses actually refer to the same address
- Learning and practicing IPv6 addressing notation and conventions
Frequently asked questions
Why can only one '::' appear in an address?
If two '::' were allowed, the number of zero groups each represents would be ambiguous — the standard restricts every address to at most one '::' for exactly this reason.
Why is IPv6's address space so much bigger than IPv4's?
IPv6 uses 128-bit addresses compared to IPv4's 32-bit addresses, expanding the total address space from about 4 billion to roughly 340 undecillion — designed with enough headroom to avoid the address exhaustion that became a genuine problem for IPv4.
Can the same IPv6 address be written in different valid ways?
Yes — because hex digits are case-insensitive and zero-compression is optional, the same address can be validly written with different capitalization or compression choices, which is why RFC 5952 defines one specific canonical form for consistency.
What is the canonical form of an IPv6 address?
Per RFC 5952: lowercase hex digits, leading zeros within each group omitted, and the longest possible run of consecutive zero groups compressed using '::' — a single, standard way to write any given address.
Does this calculator handle IPv4-mapped IPv6 addresses?
No — addresses like ::ffff:192.0.2.1, which embed an IPv4 address within an IPv6 address, and zone/scope IDs (like %eth0) aren't currently parsed by this calculator.
calixo.cloud/cctv-networking/ipv6-calculator/ — free calculator, no signup required.