IPv6 Compression and Expansion Tool
Compress an IPv6 address to RFC 5952 canonical form, expand it fully, find its network prefix and address type.
Your inputs
Results
Compressed (RFC 5952)
2001:db8::1:0:0:1
- Fully expanded
- 2001:0db8:0000:0000:0001:0000:0000:0001
- Network prefix
- 2001:db8::/64
- Address type
- Documentation (2001:db8::/32)
- Number of /64 subnets in this prefix
- 1
✓Exact calculation — rounded only for display
Notes for this result
- Computed entirely in your browser; no address is sent anywhere.
What this calculator does
IPv6 addresses can be written many ways. RFC 5952 defines one canonical, lowercase, shortest form.
Formula and method
Remove leading zeros in each group; replace the longest run of two or more zero groups (the first if tied) with “::”.
Worked example
Calculated by this tool with its default inputs:
Inputs
- IPv6 address (optionally with /prefix): 2001:0db8:0000:0000:0001:0000:0000:0001/64
Results
- Compressed (RFC 5952): 2001:db8::1:0:0:1
- Fully expanded: 2001:0db8:0000:0000:0001:0000:0000:0001
- Network prefix: 2001:db8::/64
- Address type: Documentation (2001:db8::/32)
- Number of /64 subnets in this prefix: 1
How to read the results
A single zero group is never shortened to “::”.
Assumptions and limitations
- Calculated entirely in your browser — addresses and values are never sent to a server.
- Embedded IPv4 (e.g. ::ffff:192.0.2.1) is accepted.
Questions
Why lowercase?
RFC 5952 recommends lowercase hex for consistency.
Sources
Methodology and verification
- Result type
- Exact mathematical calculation (rounded only for display)
- Formula version
- 1.0
- Automated verification
- 7 reference and validation test cases, checked against independently computed values. The site cannot be built if any of them fail.
- Editorial review
- Awaiting human editorial review. The explanation was drafted with AI assistance; the formula and examples are verified by the automated tests above.
Privacy
Everything you enter is calculated in this browser and is not sent to Numerith or anyone else. Inputs are added to a share link only if you choose to include them. Privacy policy