TTKTheTextKit

IP Address Converter

Paste an IPv4 or IPv6 address and see it in every common notation. An IPv4 address becomes a whole number, hexadecimal and binary, and an IPv6 address is shown expanded, compressed by the standard rules, as one 128-bit number and in binary. You also get the reverse DNS name and the kind of address, such as private, loopback or link-local. Everything runs in your browser.

IPv6 address, Documentation (2001:db8::/32)

Compressed
2001:db8::1
Expanded
2001:0db8:0000:0000:0000:0000:0000:0001
Whole number
42540766411282592856903984951653826561
Hexadecimal
0x20010DB8000000000000000000000001
Binary
0010000000000001:0000110110111000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000001
Reverse DNS name
1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
Where a PTR record for this address lives

An IPv4 address is 32 bits, written as four numbers or as one whole number, and an IPv6 address is 128 bits, written as eight groups of up to four hexadecimal digits. IPv6 can be shortened: leading zeros in a group are dropped, and the longest run of two or more all-zero groups becomes ::, following the canonical form in RFC 5952. The tool reads both the long and the short forms, an IPv4 ending such as ::ffff:192.0.2.128, and a zone after a % sign, and it works out the other notations, the reverse DNS name and the kind of address. Everything is worked out in your browser and nothing is uploaded.

Related Tools

[5 suggestions]

About the IP Address Converter

An IPv4 address is 32 bits, usually written as four numbers from 0 to 255, and the same address is also a single whole number, so 192.168.1.1 is 3232235777 or 0xC0A80101. The tool reads dotted addresses, whole numbers and 0x hexadecimal values. An IPv6 address is 128 bits, written as eight groups of up to four hexadecimal digits. It can be shortened by dropping leading zeros in each group and replacing the longest run of two or more all-zero groups with a double colon. The compressed form follows RFC 5952: lowercase letters, a single zero group is not shortened, and when two runs tie the first one is used, so 2001:db8:0:0:1:0:0:1 becomes 2001:db8::1:0:0:1. The tool reads both long and short forms, an ending in IPv4 style such as ::ffff:192.0.2.128, and a zone after a percent sign, such as fe80::1%eth0, which it explains and leaves out. The reverse DNS name for IPv4 reverses the four numbers and adds in-addr.arpa, and for IPv6 it lists the 32 hexadecimal digits in reverse order, one per label, under ip6.arpa. The address type comes from the private and special-purpose ranges, including 10.0.0.0/8, fe80::/10 and fc00::/7. Nothing is uploaded.

How do I shorten an IPv6 address?▾

Remove leading zeros from each group, then replace the longest run of two or more groups of zeros with a double colon. 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. A double colon can be used only once in an address.

How do I expand a compressed IPv6 address?▾

Replace the double colon with enough groups of zeros to make eight groups in total, then pad every group to four digits. ::1 expands to 0000:0000:0000:0000:0000:0000:0000:0001. The tool shows both forms.

How is an IPv4 address a single number?▾

The four numbers are bytes of one 32-bit value: a x 256^3 + b x 256^2 + c x 256 + d. For 192.168.1.1 that is 3,232,235,777. Some tools and databases store addresses this way, which makes comparing and sorting them easy.

What is an IPv4-mapped IPv6 address?▾

It is an IPv4 address carried inside IPv6 as ::ffff: followed by the four bytes, such as ::ffff:192.0.2.128. Software uses it to treat both kinds of connection in one way. The tool shows the IPv4 address inside it.

Does the tool look up or contact the address?▾

No. It only converts the text you type, in your browser. It does not connect to the address or send it anywhere.