Convert IPv4 addresses between decimal, binary, hexadecimal, octal, and IPv6 representations.
Loading tool
About IPv4 address converter
Converts an IPv4 address between dotted decimal, a 32-bit integer, hexadecimal, binary, octal and their dotted forms. It also shows the IPv4-mapped IPv6 address in short, hex and full notation, the 6to4 prefix and the reverse DNS (in-addr.arpa) name, along with the address class and special-purpose scope such as private, loopback or CGNAT. Input can be dotted decimal, an integer, or 0x, 0b or 0o prefixed values.
Common uses
- Convert an IP address stored as an integer in a database back to dotted form
- Get the binary form of an address to reason about subnet masks
- Build the in-addr.arpa name for a PTR record
- Write the IPv4-mapped IPv6 form (::ffff:a.b.c.d) of an address
FAQ
- How do I convert an IP address to a decimal number?
- Multiply each octet by its place value and add: a x 16777216 + b x 65536 + c x 256 + d. For example, 192.168.1.1 is 3232235777.
- What is an IPv4-mapped IPv6 address?
- It is an IPv6 address of the form ::ffff:a.b.c.d that represents an IPv4 address, used by dual-stack sockets so IPv6 software can handle IPv4 peers.
- Are IP address classes still used?
- Classful addressing was replaced by CIDR in 1993, so classes A to E no longer determine network size. They are still shown because the terms appear in older documentation.