Server & Hosting

IP Address Converter

Type an IPv4 or IPv6 address — or a number — and see it in every other form: decimal, hexadecimal, binary, IPv4-mapped IPv6, full and short IPv6, and its reverse DNS name.

Address or number

Try 3232235777, 2001:db8::1 or ::ffff:192.168.1.1

Conversions

One address, many forms

An IPv4 address such as 192.168.1.1 is really a single 32-bit number, 3232235777, written in four parts. Databases, firewalls and programming code often store or expect it in another form: as a whole number, in hexadecimal or binary, or wrapped in IPv6 as ::ffff:192.168.1.1. IPv6 addresses can be written in a long full form or shortened with ::.

What you get

Frequently asked questions

How do I convert an IP address to a number?

Multiply the first part by 16,777,216, the second by 65,536, the third by 256, and add them to the fourth. 192.168.1.1 becomes 3,232,235,777.

Why does my server log show ::ffff: before IPv4 addresses?

The server listens on IPv6 and represents IPv4 visitors as IPv4-mapped IPv6 addresses. The part after ::ffff: is the normal IPv4 address.

Can every IPv4 address be written as IPv6?

Yes, as an IPv4-mapped address. The reverse is not true: IPv6 has vastly more addresses than IPv4.