IP Address Converter
Convert an IPv4 or IPv6 address between dotted-decimal, integer, hexadecimal, binary, octal and IPv4-mapped IPv6 forms.
Result
Other representations
- Octal
- 0300.0250.01.01
- Dotted hex
- c0.a8.01.01
- IPv4-mapped IPv6
- ::ffff:192.168.1.1
- IPv4-compatible (deprecated)
- ::192.168.1.1
- Reverse DNS (in-addr.arpa)
- 1.1.168.192.in-addr.arpa
- 6to4 prefix (deprecated)
- 2002:c0a8:0101::/48
About IP Address Converter
The same IPv4 address can appear as dotted decimal in a config, a signed integer in a database, hex in a packet dump and octal in a badly written script. This converter moves between all of them, and produces the IPv6-mapped and reverse-DNS forms at the same time.
How the integer form works
An IPv4 address is a 32-bit unsigned number written as four bytes. 192.168.1.1 is (192 × 224) + (168 × 216) + (1 × 28) + 1 = 3,232,235,777. Storing addresses as integers makes range comparisons a simple BETWEEN and keeps sort order correct.
IPv4-mapped IPv6
A dual-stack socket represents an IPv4 peer as ::ffff:192.0.2.1. If your logs show that form, the connection arrived over IPv4 on an IPv6 listener - not over IPv6.
Common use cases
- Decoding an integer IP from an application database or NetFlow record.
- Building the in-addr.arpa or ip6.arpa name for a reverse DNS zone.
- Reading an address out of a hex packet dump.
Edge cases and gotchas
- Leading zeros are ambiguous: some libraries read 010 as octal 8, others as decimal 10. This tool rejects them in dotted-quad input rather than guessing.
- ::192.0.2.1 (IPv4-compatible) is deprecated; ::ffff:192.0.2.1 (IPv4-mapped) is the current form.