IPv6 to Binary Converter

Client-sideNo sign-upFree

Expand a full or compressed IPv6 address and convert each 16-bit group to binary.

Quick facts

Category
Converters
Best for
Expanding a compressed IPv6 address to check its full binary bit pattern
IPv6 address
✓ Valid IPv6 address
Full 128-bit binary
00100000000000010000110110111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
Group 1: 2001
0010000000000001
Group 2: 0db8
0000110110111000
Group 3: 0000
0000000000000000
Group 4: 0000
0000000000000000
Group 5: 0000
0000000000000000
Group 6: 0000
0000000000000000
Group 7: 0000
0000000000000000
Group 8: 0001
0000000000000001
In-content slot
Was this tool helpful?
On this page

Overview

Enter an IPv6 address - in full form (all 8 groups) or using "::" zero compression - and see it expanded into its 8 full 16-bit groups, each converted to a zero-padded binary string, plus the complete 128-bit binary value. The "::" compression is expanded correctly by splitting the address on "::" into a left and right side, splitting each side into its own groups, and inserting exactly as many all-zero groups as needed to reach 8 total - not by naively counting colons, which breaks on addresses with an odd or unusual group count. "::" can appear at most once in a valid address (a second occurrence is rejected), and an address with no "::" at all must have exactly 8 groups. An embedded IPv4 tail, like the one in ::ffff:192.168.1.1, is supported by converting that trailing dotted-decimal segment into its two equivalent 16-bit hex groups before expansion. Malformed input - too many groups, invalid hex characters, or more than one "::" - produces a specific error message rather than a crash. Runs entirely client-side.

Best for: Expanding a compressed IPv6 address to check its full binary bit pattern

How to use this tool

  1. Enter an IPv6 address. Full form (8 groups) or compressed with "::", like 2001:db8::1 or ::1.
  2. The "::" is expanded correctly. The tool calculates exactly how many zero groups the "::" represents, rather than guessing from colon count.
  3. Read each group in binary. All 8 groups convert to 16-bit binary individually, plus the full 128-bit value concatenated.

Frequently asked questions

The address is split on "::" into a left side and a right side, and each side is split further into its own colon-separated groups. Since a full IPv6 address always has exactly 8 groups, the number of zero groups the "::" represents is 8 minus however many groups are already present on the left and right combined - for example, 2001:db8::1 has 2 groups on the left and 1 on the right, so "::" represents 8 − 2 − 1 = 5 zero groups.

"::" zero-compression is only valid once per address, because if it appeared twice there would be no way to tell how many zero groups belong to each occurrence - the expansion math would be ambiguous. A valid address can compress at most one run of consecutive zero groups this way.

Yes - a trailing dotted-decimal IPv4 segment is converted into its two equivalent 16-bit hex groups (192.168.1.1 becomes c0a8 and 0101) before the rest of the address is expanded, since that's a valid and fairly common IPv6 notation for representing an IPv4 address (an IPv4-mapped IPv6 address).

Each group between colons must be 1 to 4 hexadecimal digits (0-9, a-f). Anything else - empty groups outside of a single valid "::", non-hex characters, or a group longer than 4 digits - is rejected with a specific error message rather than silently truncated.

Explore more free tools

Formatters, converters, validators, and generators - all free and running entirely in your browser.

Browse more tools