IPv6 address expander
Paste a shortened IPv6 address and get its full form: 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001, with every zero group restored and each of the eight groups padded to four digits. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Address
- 2001:db8::1
- Expanded
- 2001:0db8:0000:0000:0000:0000:0000:0001
- Group count
- 8
Compressed IPv6 addresses drop runs of zero hextets with a double colon and strip leading zeros inside each group, which is compact for humans but awkward for exact string comparison, spreadsheet joins, firewall rule diffs, and log analytics. This IPv6 address expander accepts a compressed, partially abbreviated, or already full address, restores every omitted zero group, and pads each of the eight hextets to four hexadecimal digits. The result is a stable canonical full form you can sort, hash, or match byte-for-byte across tools.
What full eight-group IPv6 form means and why expansion helps
An IPv6 address is one hundred twenty-eight bits written as eight groups of sixteen bits each, separated by colons, with each group shown as one to four hexadecimal digits. RFC 5952 allows compression: a single run of consecutive all-zero groups may be replaced by a double colon, and leading zeros inside a group may be dropped. That flexibility produces many valid spellings of the same address—2001:db8::1, 2001:0db8:0:0:0:0:0:1, and the fully padded form all name the same interface.
When you compare configuration files with ordinary string equality, or when you key a map, cache, or access-control list by address text, those spellings look different even though they are equal on the wire. Expanding every address to eight zero-padded hextets removes that ambiguity.
The expander walks the input, finds at most one double-colon run, counts how many hextets were written on the left and right of that run, inserts the missing all-zero groups so the total is exactly eight, and left-pads every hextet with zeros to four digits in lowercase. The expanded string is therefore unique for a given address value among pure IPv6 forms without zone IDs, which makes lexicographic sort order match numeric order within each hextet boundary and makes dual-stack inventory reports far easier to reconcile.
Where an IPv6 address expander earns its keep
Network automation and infrastructure-as-code pipelines normalize every IPv6 literal before writing Terraform, Ansible, or firewall objects so plan diffs do not churn when someone re-abbreviates an address. Security and SIEM pipelines expand source and destination fields from mixed vendor logs so correlation rules can match on a single canonical string without maintaining a library of compression variants. Cloud and data-center inventory tools join VM, load-balancer, and DNS records that arrive in different abbreviation styles into one host key.
Classroom and certification labs use a free expander so learners can check homework against the full form their textbook shows next to the compressed form. Failed validation does not consume balance. Keep requests to a single address string, pin the expanded value in tests, and you get reproducible full-form IPv6 text for CI, edge workers, and operator runbooks without standing up a full IP-address library of your own.
What you can do with it
Normalize IaC and firewall configs
Expand every IPv6 literal in Terraform, Ansible, or ACL files to eight zero-padded groups so string diffs and policy merges stop failing on harmless abbreviation differences.
SIEM and log correlation keys
Canonicalize mixed vendor log fields to one expanded form before deduplicating alerts or joining flow records across collectors.
Inventory and dual-stack host maps
Join cloud, DNS, and load-balancer records that store IPv6 in different compressed styles under a single stable host address key.
FAQ
Does the expander accept already full addresses?
Yes. Fully written addresses are re-validated and re-padded to lowercase four-digit hextets so every success path returns the same shape.
Are zone identifiers like %eth0 supported?
No. Provide the bare IPv6 address without a zone suffix.
What about IPv4-mapped addresses such as ::ffff:192.0.2.1?
Embedded IPv4 tails are converted into two hexadecimal hextets, then the full eight-group expanded form is returned. Bare IPv4 alone is rejected.
Why expand IPv6 addresses before comparing them?
Because one address has many valid spellings: 2001:db8::1 and 2001:0db8:0:0:0:0:0:1 are the same interface, yet a plain text comparison treats them as different. The full form is unique, so lists, spreadsheets and logs match exactly.
Why is an address with two double colons rejected?
Only one run of zero groups may be shortened. With two double colons there is no way to know how many zero groups each one hides, so the address is ambiguous and refused instead of guessed.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/dev/ipv6-expand \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"address":"2001:db8::1"}'const res = await fetch("https://api.kit.forhosting.com/dev/ipv6-expand", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"address": "2001:db8::1"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/dev/ipv6-expand",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"address": "2001:db8::1"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/dev/ipv6-expand", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"address":"2001:db8::1"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"address":"2001:db8::1"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/dev/ipv6-expand", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"address": "2001:db8::1"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "dev.ipv6_expand",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Optional square brackets around the address are stripped; zone identifiers and bare IPv4 strings are rejected with a clear invalid_input message.
Input contract, response shape, and error behaviour
The value may be compressed with a double colon, may omit leading zeros in any hextet, may already be fully expanded, or may use optional square brackets as in URL host form. Embedded IPv4 tails such as colon-ffff-colon then a dotted quad are converted into two hexadecimal hextets before padding. POST a JSON body with a single required string field named address (aliases ip, ipv6, and text are also accepted). On success the response echoes the trimmed original address, returns expanded as the eight-group colon-separated string, groups as an array of eight four-digit lowercase strings, was_compressed as a boolean that is true when the input used a double colon or any short hextet, and group_count fixed at eight. Missing or empty address, non-string types, more than one double colon, empty hextets without compression, non-hex characters, zone identifiers after a percent sign, bare IPv4, and wrong group counts all fail with invalid_input and are not billed. Example: address 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001 with was_compressed true. Example: address ::1 becomes 0000:0000:0000:0000:0000:0000:0000:0001. Pair the expanded field with your own equality checks or store it as a normalized column; this endpoint does not perform DNS, geolocation, or connectivity tests.
Technical questions
How do I expand a compressed IPv6 address to full form?
Send the address string (for example 2001:db8::1). The API restores omitted zero groups and leading zeros, returning eight four-digit hextets such as 2001:0db8:0000:0000:0000:0000:0000:0001.
What does the IPv6 address expander cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.