IP Address Converter
Paste an IPv4 address or a number in any common format and get every representation at once: dotted decimal, 32-bit integer, hex, binary, octal and IPv4-mapped IPv6. The tool also tells you the address class and whether it is private, public, loopback, multicast or reserved.
Last updated:
Accepts dotted decimal, decimal integer, hex, binary, octal or ::ffff: IPv4-mapped IPv6.
How to use the IP Address Converter
- Type or paste an IPv4 address (192.168.1.1) or a number such as 3232235777, 0xC0A80101 or a binary string.
- Leave the format on Auto-detect, or choose it explicitly if your input is ambiguous (for example dotted octal).
- Click Convert (results also update as you type).
- Read the conversions, class and address type, and check the step-by-step working.
- Copy the results or download the octet table as CSV.
IPv4 conversion formulas
An IPv4 address is a single 32-bit number written as four 8-bit octets. The dotted form a.b.c.d and the integer are the same value:
| Conversion | Formula | Example (192.168.1.1) |
|---|---|---|
| Dotted → integer | a × 256³ + b × 256² + c × 256 + d | 3232235777 |
| Integer → dotted | ⌊n ÷ 256³⌋ mod 256, ⌊n ÷ 256²⌋ mod 256, ⌊n ÷ 256⌋ mod 256, n mod 256 | 192.168.1.1 |
| Hex | each octet as two hex digits | 0xC0A80101 |
| Binary | each octet as eight bits | 11000000.10101000.00000001.00000001 |
| Octal | integer in base 8 (leading 0) | 030052000401 |
| IPv4-mapped IPv6 | ::ffff: + the IPv4 address | ::ffff:192.168.1.1 = ::ffff:c0a8:101 |
Special IPv4 ranges
| Range | Integer range | Purpose |
|---|---|---|
| 0.0.0.0/8 | 0 – 16,777,215 | "This network", not routable |
| 10.0.0.0/8 | 167,772,160 – 184,549,375 | Private (RFC 1918) |
| 100.64.0.0/10 | 1,681,915,904 – 1,686,110,207 | Carrier-grade NAT (RFC 6598) |
| 127.0.0.0/8 | 2,130,706,432 – 2,147,483,647 | Loopback |
| 169.254.0.0/16 | 2,851,995,648 – 2,852,061,183 | Link-local (APIPA) |
| 172.16.0.0/12 | 2,886,729,728 – 2,887,778,303 | Private (RFC 1918) |
| 192.168.0.0/16 | 3,232,235,520 – 3,232,301,055 | Private (RFC 1918) |
| 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | — | Documentation examples (TEST-NET) |
| 224.0.0.0/4 | 3,758,096,384 – 4,026,531,839 | Multicast (Class D) |
| 240.0.0.0/4 | 4,026,531,840 – 4,294,967,295 | Reserved (Class E) incl. 255.255.255.255 broadcast |
Storing addresses as integers is handy in databases: range checks such as "is this IP inside 10.0.0.0/8" become a simple BETWEEN comparison.
Frequently asked questions
How do I convert an IP address to a decimal number?
Multiply each octet by its place value and add them up: integer = a × 16,777,216 + b × 65,536 + c × 256 + d. For 192.168.1.1 that is 3,221,225,472 + 11,010,048 + 256 + 1 = 3,232,235,777.
How do I convert a decimal integer back to an IP address?
Divide repeatedly by 256: a = floor(n ÷ 16,777,216) mod 256, b = floor(n ÷ 65,536) mod 256, c = floor(n ÷ 256) mod 256 and d = n mod 256. Valid values run from 0 (0.0.0.0) to 4,294,967,295 (255.255.255.255).
Which IP addresses are private?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 for private networks. 100.64.0.0/10 is shared space used by carrier-grade NAT, 127.0.0.0/8 is loopback and 169.254.0.0/16 is link-local; none of these are routed on the public internet.
How are IP address classes determined?
Classful addressing looks at the first octet: 0-127 is Class A, 128-191 Class B, 192-223 Class C, 224-239 Class D (multicast) and 240-255 Class E (reserved). Modern networks use CIDR instead, but classes are still taught and used as shorthand.
What is an IPv4-mapped IPv6 address?
It is the IPv6 form ::ffff:a.b.c.d that dual-stack software uses to represent an IPv4 address, for example ::ffff:192.168.1.1, which can also be written ::ffff:c0a8:101.
Why can a leading zero change the address?
Some tools, including the classic inet_aton function and ping on many systems, read an octet with a leading 0 as octal, so 010.0.0.1 may become 8.0.0.1. This converter reads dotted input as decimal by default and warns you; choose the octal format if you meant octal.
Is my data sent anywhere?
No. All conversions run in your browser with JavaScript; nothing you type is uploaded.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.