IP Address Converter

Convert an IPv4 or IPv6 address between dotted-decimal, integer, hexadecimal, binary, octal and IPv4-mapped IPv6 forms.

Converter IP & Subnetting Runs in your browser
Auto-detects dotted quad, integer, hex, or IPv6 notation.
Try:

Result

Dotted decimal
192.168.1.1
Integer (32-bit)
3232235777
Hexadecimal
0xC0A80101
Binary
11000000.10101000.00000001.00000001

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
Why integers matter
The 32-bit integer form is what most databases and log pipelines store. Sorting integers gives you correct address ordering; sorting dotted-quad strings does not.

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.

Frequently asked questions

Why does my database show a negative IP?
It stored the 32-bit value in a signed column. Any address from 128.0.0.0 upward has the high bit set and reads as negative. Add 4294967296 to a negative value to recover the unsigned form.
What is 2130706433?
127.0.0.1 - localhost. It is a well-known trick for bypassing naive string filters, which is why input validation should parse rather than pattern-match.