HCODX/IPv4 to IPv6
100% browser-based · Cryptographically secure · No upload

IPv4 to IPv6

Convert IPv4 addresses to IPv6-mapped form (::ffff:0:0/96) — the standard way to carry IPv4 traffic across an IPv6 stack. Both compact (::ffff:1.2.3.4) and full (0:0:0:0:0:ffff:0102:0304) notations are shown.

IP input
Results
CIDR calculator
Address
Class
Type
Status
Ready
Example

Same address, six representations

An IPv4 address is just 32 bits. The dotted form is for humans; integer, hex, and binary are for databases and routing tables.

192.168.1.1
Dotted:   192.168.1.1
Integer:  3,232,235,777
Hex:      0xC0A80101
Binary:   11000000.10101000.00000001.00000001
Octal:    030052000401
IPv6:     ::ffff:192.168.1.1
Why integer?
SELECT * FROM logs
WHERE ip BETWEEN ipToInt('10.0.0.0')
            AND ipToInt('10.255.255.255')

→ Single integer comparison
→ Indexable
→ ~4 bytes vs 15 for string
Use cases

What you'll use this for

UUIDs are the universal "give me a unique identifier" tool — no central coordination required.

Compact storage

Store IPs as a 4-byte INT in your DB. Saves space and speeds up range queries.

Log analysis

Convert dotted IPs to integers to do range BETWEEN queries against subnet boundaries.

Subnet math

Hex and binary forms show subnet bits clearly — the boundary stands out visually.

Dual-stack work

IPv6-mapped form (::ffff:1.2.3.4) lets IPv6 sockets carry IPv4 packets.

Step by step

How to convert an IP address

1

Type the IP

Enter dotted-decimal (192.168.1.1) — or paste a decimal integer below.

2

Hit Convert

Or just keep typing — the other forms update automatically as soon as the input is valid.

3

Read the results

Integer, hex, binary, octal, and IPv6-mapped notation all appear on the right.

4

Copy what you need

Click any value to copy it (or use the Copy button to grab all formats).

FAQ

Frequently asked questions

It's an IPv6 address of the form ::ffff:0:0/96 with the IPv4 address embedded in the lower 32 bits. Defined in RFC 4291 §2.5.5.2. Lets IPv6-only sockets accept IPv4 traffic.

That older form (without ffff) was deprecated by RFC 4291. Use the IPv4-mapped form (::ffff:1.2.3.4) instead.

The short form ::ffff:1.2.3.4 is human-friendly. The full form 0:0:0:0:0:ffff:0102:0304 is what some legacy parsers need. Both encode the same 128 bits.

No — only IPv4 → IPv4-mapped IPv6. Real IPv6 addresses use 128 bits with no IPv4 relationship.

Yes. No signup, no limits, no ads. Conversion happens entirely in your browser.

About

About IPv4 address formats

An IPv4 address is a 32-bit identifier. Each of the four octets in the dotted form is one byte (0–255). The same 32 bits can be expressed in any base.

Formats

  • Dotted-decimal192.168.1.1, the human form.
  • Decimal integer3232235777, useful for DB storage.
  • Hex0xC0A80101, common in firewall configs.
  • Binary11000000.10101000.00000001.00000001, shows netmask bits.
  • IPv6-mapped::ffff:192.168.1.1, dual-stack representation.

Conversion math

  • To integer: (a<<24) | (b<<16) | (c<<8) | d
  • From integer: extract each byte with (n >>> (24-8k)) & 0xff.
Related

Related tools