Tools / IPv4 / IPv6 / Integer Converter

IPv4 / IPv6 / Integer Converter.

Convert IP addresses between IPv4, IPv6, decimal integers, hex, binary and reverse DNS names.

Runs in your browser

One per line: IPv4, IPv6 (with optional %zone), decimal integer, 0x hex or dotted 32-bit binary.

Auto treats values up to 4294967295 as IPv4.

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result

About IPv4 / IPv6 / Integer Converter

IPv4 / IPv6 / Integer Converter shows the same address in every notation you might need. Enter 192.168.1.1 and you get the decimal integer 3232235777 that databases and the inet_aton function use, the hex value 0xc0a80101, the dotted binary form, the IPv4-mapped IPv6 address ::ffff:192.168.1.1, its fully expanded 32-digit form and the reverse DNS name 1.1.168.192.in-addr.arpa for PTR records. Paste the integer or the hex value instead and the conversion runs backwards. IPv6 addresses are compressed to the canonical RFC 5952 form, with lowercase digits and the longest run of zero groups replaced by a double colon, and also expanded in full, which helps when comparing addresses from logs written by different software. Their 128-bit decimal value is calculated exactly rather than rounded, so storing addresses as DECIMAL(39) or as two 64-bit halves gives the correct numbers. Embedded IPv4 addresses in mapped, NAT64 and 6to4 addresses are extracted, and zone identifiers such as fe80::1%eth0 are kept. Every line also gets a type label like private, loopback, link-local, documentation or global unicast. A frequent mistake is writing octets with leading zeros, such as 010.000.000.001: some systems read them as octal, so the converter rejects them instead of guessing. Another is storing IPv4 integers in a signed 32-bit column, which turns addresses above 127.255.255.255 negative. Small integers such as 1 are IPv4 by default; switch Read integers as to ipv6 to get ::1 instead. Conversion runs in your browser, one address per line.

How to Use

  1. Paste IP addresses, integers or hex values, one per line.
  2. Choose how plain integers should be read if they are ambiguous.
  3. Copy the table with all notations.

Frequently Asked Questions

How is an IPv4 address converted to an integer?

Each octet is a base-256 digit, so a.b.c.d equals a×16,777,216 + b×65,536 + c×256 + d. 192.168.1.1 is 3232235777.

What is an IPv4-mapped IPv6 address?

It is the IPv4 address placed in the ::ffff:0:0/96 range, such as ::ffff:192.168.1.1, which dual-stack sockets use to represent IPv4 clients.

Why are octets with leading zeros rejected?

Different parsers read 010 as decimal 10 or octal 8. Rejecting them avoids silently converting the wrong address.

Does the tool look up the addresses?

No. It only converts notations in your browser and makes no network requests. Use IP Info for geolocation.

Related Tools