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
Run
Processes in this browser; cancel at any time
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
- 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.
- Choose the “Result format”: “Text table” or “JSON”.
- Select “Run”.
- 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.
Related tools
Convert dates and time zones
Convert one date-time per line between ISO 8601, Unix time and local time in named time zones. Daylight-saving gaps and repeats are reported.
Lunar calendar converter
Convert Gregorian dates to the Chinese lunar calendar with stem-branch year, zodiac, solar terms and festivals, or lunar dates (leap months marked 闰) back to Gregorian, one per line.
IP address lookup
See your public IP address, or the country, region and city of any IPv4 or IPv6 address or domain.
JSON, YAML and XML converter
Validate, pretty-print or convert between JSON, YAML and XML for their shared subset. External entities and custom tags are rejected.
Code formatter
Format or minify HTML, CSS, SCSS, Less, JavaScript, TypeScript, JSON, Markdown, YAML, XML, SQL, C, C++, C#, Java, PHP, Python and nginx configuration.
HTML, CSS and JavaScript runner
Write HTML, CSS and JavaScript and see the page live with its console output, in an isolated frame.