IPv4 Address Converter
Accepts: decimal · binary (dotted) · hex (0x…) · hex colons · octal · integer · ::ffff:…
How it works
An IPv4 address is 32 bits. Every format below is just a different way to write the same 32-bit value. This tool auto-detects your input format, parses it to a 32-bit integer, then outputs all representations simultaneously.
Dotted-decimal
The everyday format: four octets (0–255) separated by dots. Each octet is 8 bits. For 192.168.1.1, the four octets are 192, 168, 1, and 1.
Binary
Each octet becomes 8 binary digits. 192 in binary: 128+64 = 11000000. The full powers of 2 per bit position are 128, 64, 32, 16, 8, 4, 2, 1.
Hexadecimal
Base-16. Each octet becomes two hex digits: 192 → C0, 168 → A8. Combined: 0xC0A80101. Common in Wireshark captures, programming APIs, and low-level networking.
Integer
The 32-bit unsigned integer. Formula: O1×256³ + O2×256² + O3×256 + O4. Used in MySQL INET_ATON(), databases, and compact storage. Max value: 4,294,967,295.
Octal
Base-8, each octet prefixed with 0. Rarely used today but appears in some Unix networking contexts. Caution: 0177 in octal = 127 in decimal.
IPv4-mapped IPv6
Format ::ffff:x.x.x.x. Used by dual-stack systems and socket APIs so IPv6-only applications can handle IPv4 connections transparently.
FAQ
How do I convert an IP address to binary?
Convert each octet (the numbers between dots) to its 8-bit binary representation. For example, 192.168.1.1 becomes 11000000.10101000.00000001.00000001. Each octet ranges from 0 (00000000) to 255 (11111111).
What is the integer representation of an IP address?
An IPv4 address can be expressed as a single 32-bit unsigned integer. Multiply the first octet by 16777216 (256³), the second by 65536 (256²), the third by 256 (256¹), and add the fourth. For example, 192.168.1.1 = 192×16777216 + 168×65536 + 1×256 + 1 = 3,232,235,777.
What is an IPv4-mapped IPv6 address?
An IPv4-mapped IPv6 address embeds an IPv4 address within IPv6 format as ::ffff:x.x.x.x. For example, 192.168.1.1 maps to ::ffff:192.168.1.1 (or ::ffff:c0a8:0101 in hex). This allows IPv6-only software to handle IPv4 connections.
How do I convert an IP address to hexadecimal?
Convert each octet to its 2-digit hex value. 192 = C0, 168 = A8, 1 = 01, 1 = 01. Combined: 0xC0A80101. The hex form is commonly seen in packet captures, programming, and low-level networking.