YourTools.
简体中文
Back to the catalog
Tools

IPv4 and IPv6 converter

Convert IPv4 addresses to IPv4-mapped IPv6, 6to4 and NAT64 forms, integers, hex and binary, and IPv6 to its compressed, full and integer forms with any embedded IPv4.

Process locally

Files stay in this browser session. Closing or clearing releases them.

Add text

Type or paste the text to process

Adjust settings

Optional: Result format

IPv4 and IPv6 converter

Run

Processes in this browser; cancel at any time

Add text first

About this tool

Convert IP addresses between notations. Turn an IPv4 address into an integer for a database column, into hex or binary for a networking exercise, or into its IPv4-mapped, 6to4 and NAT64 IPv6 forms. Expand a compressed IPv6 address to all eight groups, or shorten a long one. Put one address per line to convert a whole list.

Each result also names the address type, such as private, loopback, link-local or documentation, and shows the IPv4 address carried inside an IPv6 one. This is a converter, not a location lookup: it runs in your browser, and the addresses are not uploaded.

How to use it

  1. Enter one address per line: a dotted IPv4 address, a 32-bit number such as 3232235786 or 0xC0A8010A, or an IPv6 address. Select “Use example” to try three.
  2. Choose the “Result format”: “Text table” or “JSON”.
  3. Select “Run”.
  4. Preview the results, one block per address, and download them as ip.txt or ip.json.

Formats and limits

Input
Text
Output
Plain text, JSON
Size limit
1 MB
Settings
Result format (Text table, JSON)
Privacy
Files stay in the current browser session. No file bytes are uploaded.
Price
Free, no sign-up

Common questions

Which forms are listed for an IPv4 address?

The integer, hex and dotted binary values and the address type, the IPv4-mapped IPv6 address in dotted, hex and full forms, the deprecated IPv4-compatible form, the 6to4 /48 prefix and the NAT64 address under 64:ff9b::/96.

How is an IPv6 address shortened?

Following RFC 5952: lowercase letters, no leading zeros in a group, and the longest run of two or more zero groups replaced by ::. IPv4-mapped and NAT64 addresses keep their last 32 bits in dotted form, such as ::ffff:10.0.0.1.

Why is 192.168.01.1 rejected?

Parts with a leading zero are not accepted, since some systems read them as octal numbers. Write the address as 192.168.1.1; each part must also be between 0 and 255.

Can it show where an IP address is located?

No, it only converts notation, entirely in your browser. To find the country, region and city of an address, use IP address lookup, which looks the address up on this site’s server.

Are brackets, zone IDs or CIDR prefixes accepted?

Square brackets around an IPv6 address and a zone ID such as %eth0 are accepted and ignored. A prefix length such as /24 is not, so remove it first.