IPv6 to Binary Converter
CU-06Paste an IPv6 address and get its 128 bits, written as eight groups of 16. The second button turns 128 binary digits back into an address.
Runs in your browser. Nothing is uploaded.
IPv6 addresses, one per line (for the second button: 128 binary digits per line)
Result
How to use it
- Type or paste IPv6 addresses, one per line. Sample loads four, including one with an IPv4 ending.
- Press IPv6 to binary. Each address becomes 128 binary digits. Choose colons, spaces or no separator between the 16-bit groups.
- To go back, put 128-digit binary strings in the box and press Binary to IPv6. Tick compress to get the shortest form with ::.
- Copy the result or download it as a .txt file.
How an address becomes 128 bits
An IPv6 address is eight groups of four hex digits, 16 bits each. The tool expands any :: to the right number of zero groups, writes every group in full, and converts each to 16 binary digits. 2001:db8::1 therefore starts 0010000000000001 and ends 0000000000000001. An address that ends in a dotted IPv4 part, such as ::ffff:192.0.2.128, is also accepted, and the four IPv4 bytes fill the last two groups.
Going from binary back to an address
The binary side needs exactly 128 digits. Colons, dots, dashes, spaces and a leading 0b are ignored, so you can paste groups as they came out of the first button. The bits are split into eight groups and written in hex, either in full or compressed with the usual rule: the longest run of zero groups, at least two long, becomes ::. Only notation is converted; the tool does not tell you whether an address is routable or assigned.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
"nope" is not a valid IPv6 address. Only hex digits, colons and dots are allowed. | The text is not an IPv6 address. | Check the address. Zone identifiers such as %eth0 and prefix lengths such as /64 must be removed first. |
An IPv6 address is 128 bits, and "1010" has 4. Give all 128 bits (spaces, colons and dots between groups are ignored). | The binary text has the wrong number of digits. | Provide all 128 binary digits. |
Questions people ask
How do I convert an IPv6 address to binary?
Expand the address to eight groups of four hex digits, then write each group as 16 bits. The tool does this for you: paste the address, press IPv6 to binary and you get 128 digits, grouped by 16 if you keep the colon separator.
How many bits is an IPv6 address?
128 bits, made of eight 16-bit groups. That is 32 hex digits when written in full. An IPv4 address, by comparison, is 32 bits. The binary output of this tool is always exactly 128 digits.
Does it handle the :: shorthand?
Yes. One :: stands for a run of zero groups, and the tool fills in however many are needed to reach eight groups. More than one :: is invalid and is reported as an error, as are three colons in a row.
Can I convert binary back to an IPv6 address?
Yes, with the Binary to IPv6 button. Give all 128 bits; separators are ignored. Tick the compress option for the short form with ::, or leave it off for all eight groups written in full.
Does it accept an address with a prefix like /64?
No. A prefix length or a zone such as %eth0 is rejected with an error rather than being dropped silently. Remove the part after the slash or percent sign and convert the address itself.
About this tool
Each of the 8 groups of an address is written as 16 binary digits, so the result is always 128 digits. The address may use :: for a run of zeros and may end in a dotted IPv4 part (::ffff:192.0.2.128). Zone identifiers such as %eth0 and prefix lengths such as /64 are rejected rather than dropped. Going back, the binary needs exactly 128 digits; colons, dots, dashes and spaces between groups are ignored. The address is written in full, or compressed with the usual :: rule (the longest run of zero groups, at least two) if the box is ticked. This only converts notation; it does not check that an address is routable or assigned.