IPv6 Compress Calculator
Enter a full 8-group IPv6 address to get its compressed form.
Result
How it is calculated
The input must be a full address of exactly eight groups separated by colons, each group 1 to 4 hex digits. Anything else, including an already shortened address that contains ::, is rejected. The tool applies the usual compression rules in order: letters are converted to lower case, leading zeros are removed from each group (0202 becomes 202, 0000 becomes 0), then the longest run of consecutive all-zero groups is replaced by ::. A run must be at least two groups long; a lone zero group stays written as 0. If two runs have the same length, the first one is collapsed. The expanded form (each group padded to four digits) is also returned, along with a note saying how many groups were replaced.
Worked example
Input: fe80:0000:0000:0000:0202:B3FF:FE1E:8329. Lower case and strip leading zeros: fe80, 0, 0, 0, 202, b3ff, fe1e, 8329. The longest run of zero groups is the three in the middle (groups 2 to 4), and these become ::. Result: fe80::202:b3ff:fe1e:8329. The expanded form is fe80:0000:0000:0000:0202:b3ff:fe1e:8329, and the note says a run of 3 zero groups was replaced.
Common mistakes
- Pasting an address that is already shortened, such as
2001:db8::1. The tool needs all eight groups written out, so it gives no result for it. - Leaving a group with more than four hex digits or a character outside 0-9 and a-f. Such a group makes the whole address invalid.
- Expecting a single zero group to be turned into
::. The double colon replaces only runs of two or more, so 2001:db8:1:0:1:1:1:1 stays as written. - Using
::twice by hand. If two separate zero runs exist, only the longest (or the first when tied) is collapsed, and the other is written as 0:0. - Pasting an address that has a prefix length (/64) or a zone name (%eth0). The extra text makes the last group invalid; remove it first.
About this calculator
A fully expanded IPv6 address has eight groups of four hexadecimal digits separated by colons (e.g. 2001:0db8:0000:0000:0000:ff00:0042:8329), which is accurate but unwieldy to read or type. Compression shortens it in two steps defined by RFC 5952: first, leading zeros within each group are stripped (0db8 becomes db8, 0042 becomes 42), and second, the single longest run of one or more consecutive all-zero groups is collapsed into a double colon ::, which can appear at most once in a compressed address since two would make the number of omitted groups ambiguous.
Applying both rules to the example above gives 2001:db8::ff00:42:8329 — dramatically shorter and easier to work with, while still expanding back to exactly the same 128-bit address. Network engineers and system administrators rely on this canonical compressed form when writing configuration files, DNS records (AAAA), firewall rules, and documentation, since consistent compression avoids ambiguity between equivalent representations of the same address; this calculator takes a full 8-group IPv6 address and returns its compressed form.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments