logo
GeekFormat

IPv6 Toolbox

IPv6 Expand / Compress / Classify

Quickly validate IPv6 addresses, get fully expanded notation, compressed notation, address classification, reverse nibble format, and more.

Results

documentation (2001:db8::/32)
Expanded Format
2001:0db8:0000:0000:0000:0000:0000:0001
Compressed Format
2001:db8::1
Address Classification
documentation (2001:db8::/32)

<p>The IPv6 Toolbox is a free online IPv6 address processing tool designed specifically for network engineers, system administrators, and developers. With global IPv4 address exhaustion complete, IPv6 has become the standard protocol for modern networks. However, IPv6 addresses are 4 times longer than IPv4, have flexible formatting rules, and zero compression allows the same address to be written in multiple legitimate ways, causing confusion for network configuration, log troubleshooting, DNS setup, and firewall rule writing.</p><p>This tool provides three core features: <strong>IPv6 Expansion</strong> — expands shorthand compressed addresses to full 8-group 4-digit hexadecimal format for easy address range comparison and problem diagnosis; <strong>IPv6 Canonical Compression</strong> — compresses full addresses to optimal notation per RFC 5952 official specification, ensuring consistent address formatting in configuration files; <strong>IPv6 Address Classification</strong> — auto-identifies address types (loopback, link-local, ULA, multicast, documentation, global unicast, etc.) with usage and routing attributes annotated.</p><p>Whether configuring server IPv6 addresses, writing firewall rules, analyzing network logs, planning IPv6 subnets, or learning IPv6 protocols, the GeekFormat IPv6 Toolbox helps you improve efficiency and reduce human error. All processing happens locally in your browser, no data uploaded, secure and reliable.</p>

Related

Use Cases

  • Dual-stack network deployment: In environments running both IPv4 and IPv6, unify IPv6 address formatting across servers, routers, and load balancers to avoid configuration errors and connectivity issues from inconsistent notation
  • Network troubleshooting: When analyzing firewall, Nginx, or web server logs, expand or compress IPv6 addresses from logs to compare with configuration files and quickly locate address mismatch or routing errors
  • DNS record configuration: When configuring AAAA records or ip6.arpa reverse DNS records, convert IPv6 addresses to canonical format to ensure correct DNS record formatting and accurate nibble format for reverse resolution
  • Firewall rule writing: When writing ip6tables, nftables, or cloud security group rules, normalize IPv6 addresses and CIDR prefixes to avoid rule matching failures caused by different zero compression notations
  • IPv6 subnet planning: When planning enterprise IPv6 addressing, verify that address prefix lengths (/48 for sites, /64 for subnets, /128 for hosts) are correct and confirm network segment types and usage
  • Programming and development debugging: When developing IPv6-enabled network applications, validate that IPv6 addresses in your code are correctly formatted, handle [IPv6]:port format parsing in URLs
  • Docker/K8s container networking: Troubleshoot container IPv6 connectivity issues, identify container link-local and global unicast addresses, verify Docker IPv6 network configuration correctness
  • Teaching demonstration and learning: When learning IPv6 protocols, intuitively understand zero compression rules, address classification, and prefix notation, observe expansion and compression patterns through examples
  • Security auditing and log analysis: During security analysis, batch compare IPv6 address notations from different log sources, unify various shorthand formats to full format for correlation analysis
  • Documentation standardization: When writing technical documentation, configuration manuals, or API docs, uniformly convert IPv6 addresses to RFC 5952 canonical format for improved professionalism and consistency

Features

  • IPv6 expansion: Expands compressed notation (e.g., 2001:db8::1) to full 8-group hexadecimal format (2001:0db8:0000:0000:0000:0000:0000:0001) for easy log comparison and address range analysis
  • RFC 5952 canonical compression: Intelligently selects the longest run of zero groups for :: compression, automatically strips leading zeros, outputs IETF-compliant canonical format to avoid configuration inconsistencies
  • Smart address classification: Auto-detects 7 IPv6 address types — loopback ::1, link-local fe80::/10, unique local fc00::/7, multicast ff00::/8, documentation 2001:db8::/32, global unicast, invalid address
  • Format validation with error hints: Real-time detection of IPv6 format errors including multiple :: occurrences, groups exceeding 4 hex digits, invalid characters, wrong group count, with clear error explanations
  • IPv4-mapped address detection: Auto-identifies IPv4-mapped IPv6 addresses (e.g., ::ffff:192.0.2.1) to distinguish compatible address types in dual-stack environments
  • CIDR prefix parsing: Supports IPv6 addresses with prefix lengths (e.g., 2001:db8::/32), recognizes prefix length and annotates network range usage
  • One-click copy: Copy compressed format, expanded format, and classification results with one click, paste directly into config files, firewall rules, or scripts
  • Batch history: Automatically records recently processed IPv6 addresses for quick comparison and switching during network configuration debugging
  • Real-time processing with no wait: Pure browser-side JavaScript processing, no address upload to servers, protects sensitive network topology information, results appear instantly as you type
  • Multi-format input compatibility: Supports pasting compressed format, expanded format, with CIDR suffix, with port number ([::1]:8080 format), IPv4-mapped format and other common notations
  • Address usage explanation: When classifying, also provides usage instructions for that address type, routability status, and applicable scenarios to help beginners understand IPv6 address planning
  • Zero-install web-based: No software download required, works in any browser, supports Windows/macOS/Linux platforms, works on mobile devices too

How to Use

  1. Open the IPv6 Toolbox page and paste or type the IPv6 address you want to process in the input box. Supports compressed format (e.g., 2001:db8::1), full format (e.g., 2001:0db8:0000:0000:0000:0000:0000:0001), CIDR prefix format (e.g., 2001:db8::/32), port format (e.g., [::1]:8080), IPv4-mapped format (e.g., ::ffff:192.168.1.1), and other common input forms.
  2. After input, the tool automatically processes in real-time — no button click needed. If the address format has errors, a red error message appears immediately explaining the specific error reason (e.g., multiple :: occurrences, group exceeding 4 digits, invalid characters, etc.) for easy correction.
  3. View the "Expanded Format" result: This shows the full form of the IPv6 address, 8 groups of 4 hex digits each, with leading zeros padded, all compressed zero sections restored to consecutive 0000s, making it easy to compare addresses segment by segment.
  4. View the "Canonical Compressed Format" result: This is the optimal compression format output per RFC 5952 specification, automatically selecting the longest consecutive zero run for compression and stripping unnecessary leading zeros — this is the standard notation recommended for use in config files and documentation.
  5. View the "Address Classification" section: The tool automatically identifies which type the address belongs to, displaying type name, prefix range, example address, whether publicly routable, typical usage, and other information. Common types include loopback, link-local, unique local address (ULA), multicast, documentation example address, global unicast, etc.
  6. If the input includes a CIDR prefix length (e.g., /64), the tool additionally annotates the typical usage for that prefix (e.g., /64 for standard subnets, /48 for site allocation, /128 for host addresses) and a reference for how many addresses are in that network segment.
  7. Click the "Copy" button to the right of each result section to copy the corresponding formatted IPv6 address to your clipboard with one click, paste directly into terminals, config files, DNS management interfaces, or code to avoid manual input errors.

FAQ

What do the two colons :: mean in the middle of an IPv6 address?

:: is IPv6's Zero Compression shorthand rule, used to replace one or more consecutive groups of all zeros (0000). For example, the full address 2001:0db8:0000:0000:0000:0000:0000:0001 has 6 consecutive zero groups in the middle and can be written as 2001:db8::1, greatly shortening the address length. Note the rules: :: can only appear once per IPv6 address, otherwise ambiguity arises; :: can be at the beginning, middle, or end. Loopback address is ::1 (compressing 7 leading zero groups), unspecified address is just :: (all 8 groups are zero).

Why does my network card have several IPv6 addresses?

This is normal. IPv6 network interfaces typically have multiple addresses: ①one link-local address (starting with fe80::, auto-generated, for low-level communication); ②one or more global unicast addresses (public addresses, obtained via SLAAC or DHCPv6); ③if privacy extensions are enabled (Windows/Linux/macOS enable by default), there are also temporary addresses (randomly generated, periodically changed, for outbound connections to protect privacy); ④there may also be addresses for multiple prefixes (e.g., connecting to multiple networks simultaneously, or having multiple IPv6 prefixes). Servers are usually recommended to disable privacy extensions and use fixed stable addresses for manageability.

Why can't addresses starting with fe80:: be accessed across subnets? Why do I need %eth0 when pinging?

fe80::/10 are link-local addresses, designed to be valid only on the local Layer 2 link (same switch, same WiFi network, same broadcast domain), and routers <strong>absolutely never</strong> forward packets with source or destination link-local addresses, so they inherently cannot be accessed across network segments. As for adding %eth0 (also called zone id, scope id), it's because every interface automatically generates its own link-local address — multiple interfaces may all have fe80:: addresses, and if you don't specify which interface to send from, the OS doesn't know which network card to send to. So you must include %interface_name when accessing link-local addresses. The part after % is only meaningful locally, it's not part of the address itself.

Why is /64 recommended for IPv6 subnets? Can I use longer prefixes?

/64 is the standard IPv6 subnet length, primarily because SLAAC (Stateless Address Autoconfiguration) mandates that subnet prefixes must be 64 bits — SLAAC uses EUI-64 or stable privacy algorithms to generate 64-bit interface identifiers, so 64-bit prefix + 64-bit interface ID = exactly 128 bits. If you use prefixes longer than /64 (like /80, /96, /112), SLAAC won't work correctly. While /127 is commonly used for router point-to-point interconnection (RFC 6164 recommended) and /128 for loopback addresses, user segments, Ethernet segments, VLANs, etc. should all use /64. And /64 has 2⁶⁴ addresses (about 1.8×10¹⁹), effectively unlimited — there's no need to divide into smaller subnets to conserve addresses.

Does IPv6 still need NAT? Why do I hear about NAT66?

One of IPv6's original design goals was to abolish NAT, since address space is large enough that every device can have public addresses and end-to-end connectivity is restored. But in actual deployment, NAT66 (IPv6-to-IPv6 NAT, prefix translation) still has use cases, such as multi-ISP multi-homing using NAT for redundancy instead of BGP, enterprises hiding internal network structure, etc. But NAT66 is far less pervasive than IPv4 NAPT, doesn't require port address translation, and IPv6 end-to-end reachability is the mainstream direction. NAT64 is a different thing, used for IPv6-only networks accessing IPv4 resources during transition.

What is the default gateway address in IPv6? Why does it start with fe80::?

IPv6 default gateway (next hop) addresses are typically <strong>the router's link-local address (starting with fe80::)</strong>, not a same-segment public address like in IPv4. This is because routers send their link-local address as the gateway via NDP Router Advertisement (RA) messages, and hosts automatically add default routes pointing to this fe80:: address upon receipt. This is normal — link-local addresses as next hops work perfectly fine because after route lookup for next hop, you only need to resolve that address's MAC address on the local link to forward, it doesn't require the gateway to share a public network prefix with the host.

What kind of address is ::ffff:192.168.1.1?

This is an <strong>IPv4-Mapped IPv6 Address</strong>, format ::ffff: followed by IPv4 address. It's used on dual-stack sockets: when an IPv6 socket binds to :: with IPv6-on enabled, it accepts not only IPv6 connections but also IPv4 connections, and the source address appears in ::ffff:IPv4 address form. For example, when 192.168.1.1 connects to a server, the server sees the client address as ::ffff:192.168.1.1. Note not to confuse this with deprecated IPv4-compatible addresses (:: directly followed by IPv4 without ffff:).

Does case matter in IPv6 addresses? Are 2001:DB8::1 and 2001:db8::1 the same address?

They are the same address — hex letters a-f in IPv6 addresses are case-insensitive, so 2001:DB8::1, 2001:Db8::1, and 2001:db8::1 are all equivalent at the network level. However, RFC 5952 (IPv6 address text representation specification) recommends lowercase letters, and this tool's canonical compression output uniformly converts to lowercase to ensure consistent formatting.

Why doesn't IPv6 have broadcast addresses? What about ARP?

IPv6 eliminated Layer 2 broadcasts; all broadcast functionality is implemented using <strong>Multicast</strong>, which greatly reduces broadcast storms in networks and improves efficiency. IPv4's ARP (Address Resolution Protocol, which broadcasts "who has 192.168.1.1 tell me your MAC") is replaced in IPv6 by <strong>NDP (Neighbor Discovery Protocol)</strong>, which uses ICMPv6 messages and solicited-node multicast addresses (ff02::1:ffxx:xxxx) to resolve neighbor MAC addresses — only the requested node processes that multicast, it doesn't disturb all hosts on the segment.

How do I tell if my network has IPv6?

Several methods: ①Visit websites like test-ipv6.com to detect; ②At command line type ip -6 addr (Linux), ifconfig (macOS/Linux), or ipconfig (Windows) to see if network cards have addresses starting with 2 or fe80 (having only fe80 doesn't mean public IPv6); ③ping6 2001:4860:4860::8888 (Google IPv6 DNS) or ping 240c::6666 (CNNIC IPv6 DNS) — if it works you have public IPv6 connectivity; ④Access IPv6-enabled websites like ipv6.google.com. Home users need both ONT and router to have IPv6 enabled with ISP service activated to use it.

What does the % mean in an IPv6 address? Like fe80::1%eth0

The part after % is called a <strong>Zone ID or Scope ID</strong>, used to identify which network interface the address belongs to, primarily used for addresses with local scope like link-local addresses (fe80::). Because every interface has its own link-local address, the same fe80::1 on eth0 and wlan0 might be different routers, so you need %eth0 to specify which interface to send from. Zone ID is only meaningful locally, cannot be used across devices, and is not part of the IPv6 address itself — the address is still fe80::1. When writing config files, analyzing logs, or using across devices you should remove the % suffix.

How do I configure IPv6 reverse DNS? What is nibble format?

IPv6 reverse resolution is under the ip6.arpa domain using nibble format: first expand the IPv6 address to full 8-group form (no :: abbreviation), getting 32 hex characters; then reverse the order of those 32 characters <strong>completely</strong>, separating each character with dots; finally append .ip6.arpa suffix. For example 2001:db8::1 expanded is 20010db8000000000000000000000001, reversed is 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.2.ip6.arpa. This process makes it very easy to miscount zeros, so we recommend using this tool's expanded format to assist. Reverse DNS typically requires your ISP to delegate the corresponding prefix's ip6.arpa subdomain to you before you can configure PTR records.

What's the difference between ULA (fc00::/7) and link-local (fe80::/10)?

Both are non-public addresses but serve different purposes: ①Link-local fe80::/10: auto-generated per interface, valid only on a single Layer 2 link, cannot be routed across routers, no routing configuration needed, used for NDP, DHCPv6, routing protocol adjacency and other low-level communication, like a device's "local ID card"; ②ULA fc00::/7 (actually using fd00::/8): a private address range similar to IPv4 private addresses, can be routed across VLANs, routers, and sites within an enterprise but not on the public Internet, used for internal enterprise communication, equivalent to IPv6's 10.0.0.0/8, requires manual configuration or DHCPv6 allocation, needs internal routing support. One is "talking within the same room", the other is "company internal communication", while public addresses are "global communication".

Why can't IPv6 firewalls block ICMP like IPv4 firewalls can?

IPv6's dependence on ICMPv6 is far greater than IPv4's dependence on ICMPv4. In IPv4 you can block most ICMP (except PMTU which might cause some issues) and still work normally, but in <strong>IPv6 you absolutely must not blindly drop ICMPv6</strong> — because ICMPv6 carries NDP neighbor discovery (replacing ARP, without it same-segment communication fails), Router Advertisements RA (SLAAC autoconfiguration getting prefixes and gateways), PMTU Path MTU Discovery (without it large packets get dropped and can't retransmit), destination unreachable, packet too big, and other critical functions. If ip6tables rules DROP all ICMPv6, you'll experience various strange network problems (small data pings work but large data doesn't, addresses obtained but can't access Internet, etc.). The correct approach is to allow necessary ICMPv6 types.

Why does the 2001:db8:: address range appear everywhere in examples? Can I use it for real?

2001:db8::/32 is a prefix reserved by RFC 3849 specifically for documentation, books, tutorials, example code, and test environments, like 192.0.2.0/24 (TEST-NET-1), 198.51.100.0/24, 203.0.113.0/24 in IPv4. Anyone can freely use this prefix in docs, tutorials, and blogs for example addresses without worrying about conflicts with real public addresses — because no router routes 2001:db8::/32 on the public Internet. So you cannot configure 2001:db8:: addresses on real network devices for communication; it's for illustrative purposes only. All IPv6 example addresses in this tool's documentation use this reserved prefix.

术语表

IPv6
Internet Protocol version 6, the next-generation IP protocol designed by IETF, uses 128-bit addresses to solve IPv4 address exhaustion, with built-in security, QoS, and autoconfiguration features, the foundational protocol of the modern Internet.
IPv4
Internet Protocol version 4, uses 32-bit addresses with about 4.3 billion addresses total, deployed since 1983, currently still running in dual-stack with IPv6; global addresses were fully allocated in 2019.
CIDR
Classless Inter-Domain Routing, IP address notation in address/prefix-length format (e.g., 2001:db8::/32), replacing traditional A/B/C class address division, improving routing efficiency.
Prefix Length
The number after the slash in CIDR notation indicating how many leading bits are network bits. IPv6 prefix lengths range 0-128; common values are /128 (host), /64 (subnet), /48 (site), /32 (ISP).
Zero Compression
IPv6 address shorthand rule where one or more consecutive all-zero groups (0000) can be replaced by double colon ::, but :: can only appear once per address, greatly shortening IPv6 address writing.
RFC 5952
IETF-published IPv6 address text representation specification defining recommended canonical compression format (lowercase, leading zero omission, compressing longest zero run, not compressing single zeros, etc.), ensuring the same address has only one canonical representation.
Global Unicast
Globally routable public IPv6 addresses, equivalent to IPv4 public addresses, typically starting with 2000::/3, used for Internet communication.
Link-Local
Addresses with fe80::/10 prefix, valid only on the local Layer 2 link, not forwarded by routers, autoconfigured on every IPv6 interface, used for NDP neighbor discovery, DHCPv6, routing protocols, and other low-level communication.
Unique Local Address (ULA)
fc00::/7 prefix, equivalent to IPv4 private addresses, routable only within organizations, not on public Internet, for internal enterprise networks; fd00::/8 is used for actual allocation.
Multicast
ff00::/8 prefix, one-to-many communication, packets delivered to all interfaces joining a multicast group, replacing IPv4 broadcast, used for routing protocols, service discovery, streaming media, and other scenarios.
Anycast
Multiple nodes configured with the same address, packets routed to the nearest node, used for CDNs, DNS root servers, load balancing; cannot be distinguished from unicast by address format.
Loopback Address
::1/128 in IPv6, equivalent to IPv4's 127.0.0.1, address for node to send to itself, used for local testing and inter-process communication, never appears on the network.
Unspecified Address
::/128, equivalent to IPv4's 0.0.0.0, represents address non-existent/unspecified, used during node startup or when binding all interfaces.
SLAAC
Stateless Address Autoconfiguration, IPv6-exclusive feature where clients automatically generate addresses based on router-advertised prefixes without needing a DHCP server, requires subnet prefixes to be /64.
Dual Stack
Devices running both IPv4 and IPv6 protocol stacks simultaneously, having both address types, selecting protocol based on application and DNS, the currently dominant IPv4-to-IPv6 transition solution.
NAT64
IPv6/IPv4 transition technology allowing IPv6-only nodes to access IPv4 resources by performing address translation at the network boundary, paired with DNS64 to synthesize AAAA records from A records.
4to6
Umbrella term for various IPv4-to-IPv6 transition and tunneling technologies like 4in6, DS-Lite, MAP-T, etc., used for interworking between the two protocols during transition.
nibble
Half a byte, 4 bits, corresponding to one hexadecimal character. IPv6 reverse resolution uses nibble format, reversing 32 hex characters and appending .ip6.arpa suffix.
ip6.arpa
IPv6 reverse DNS resolution domain; IPv4 reverse domain is in-addr.arpa, IPv6 is ip6.arpa, PTR records constructed using nibble format.
EUI-64
IEEE 64-bit Extended Unique Identifier, method for converting 48-bit MAC addresses to 64-bit interface IDs (inserting FFFE in the middle of MAC and inverting the U/L bit), used by SLAAC for automatic address configuration, has privacy implications.

IPv6 Address Type Reference

IPv6 Common Prefix Length Reference

IPv4 vs IPv6 Comparison

Troubleshooting