Decimal to IP Converter
Convert any decimal number to its IPv4 address — with every step of the division shown, so you see exactly how each octet is found. Free, instant, and everything runs in your browser.
Convert a decimal number
Enter any whole number from 0 to 4,294,967,295 (2³² − 1). Commas and spaces are ignored.
Worked examples
Click any row to load it into the converter above.
| Decimal | Division steps | IPv4 address |
|---|---|---|
| 3,232,235,777 | 3,232,235,777 ÷ 16,777,216 = 192 (rem 11,010,305) → 11,010,305 ÷ 65,536 = 168 (rem 257) → 257 ÷ 256 = 1 (rem 1) → 1 ÷ 1 = 1 (rem 0) | 192.168.1.1 |
| 4,294,967,295 | 4,294,967,295 ÷ 16,777,216 = 255 (rem 16,777,215) → 16,777,215 ÷ 65,536 = 255 (rem 65,535) → 65,535 ÷ 256 = 255 (rem 255) → 255 ÷ 1 = 255 (rem 0) | 255.255.255.255 |
| 0 | 0 ÷ 16,777,216 = 0 (rem 0) → 0 ÷ 65,536 = 0 (rem 0) → 0 ÷ 256 = 0 (rem 0) → 0 ÷ 1 = 0 (rem 0) | 0.0.0.0 |
| 2,130,706,433 | 2,130,706,433 ÷ 16,777,216 = 127 (rem 1) → 1 ÷ 65,536 = 0 (rem 1) → 1 ÷ 256 = 0 (rem 1) → 1 ÷ 1 = 1 (rem 0) | 127.0.0.1 |
| 134,744,072 | 134,744,072 ÷ 16,777,216 = 8 (rem 526,344) → 526,344 ÷ 65,536 = 8 (rem 2,056) → 2,056 ÷ 256 = 8 (rem 8) → 8 ÷ 1 = 8 (rem 0) | 8.8.8.8 |
| 167,772,161 | 167,772,161 ÷ 16,777,216 = 10 (rem 1) → 1 ÷ 65,536 = 0 (rem 1) → 1 ÷ 256 = 0 (rem 1) → 1 ÷ 1 = 1 (rem 0) | 10.0.0.1 |
| 2,886,729,729 | 2,886,729,729 ÷ 16,777,216 = 172 (rem 1,048,577) → 1,048,577 ÷ 65,536 = 16 (rem 1) → 1 ÷ 256 = 0 (rem 1) → 1 ÷ 1 = 1 (rem 0) | 172.16.0.1 |
| 4,294,967,294 | 4,294,967,294 ÷ 16,777,216 = 255 (rem 16,777,214) → 16,777,214 ÷ 65,536 = 255 (rem 65,534) → 65,534 ÷ 256 = 255 (rem 254) → 254 ÷ 1 = 254 (rem 0) | 255.255.255.254 |
| 16,777,216 | 16,777,216 ÷ 16,777,216 = 1 (rem 0) → 0 ÷ 65,536 = 0 (rem 0) → 0 ÷ 256 = 0 (rem 0) → 0 ÷ 1 = 0 (rem 0) | 1.0.0.0 |
| 65,536 | 65,536 ÷ 16,777,216 = 0 (rem 65,536) → 65,536 ÷ 65,536 = 1 (rem 0) → 0 ÷ 256 = 0 (rem 0) → 0 ÷ 1 = 0 (rem 0) | 0.1.0.0 |
| 256 | 256 ÷ 16,777,216 = 0 (rem 256) → 256 ÷ 65,536 = 0 (rem 256) → 256 ÷ 256 = 1 (rem 0) → 0 ÷ 1 = 0 (rem 0) | 0.0.1.0 |
| 1 | 1 ÷ 16,777,216 = 0 (rem 1) → 1 ÷ 65,536 = 0 (rem 1) → 1 ÷ 256 = 0 (rem 1) → 1 ÷ 1 = 1 (rem 0) | 0.0.0.1 |
Batch mode
Paste one decimal number per line. Invalid lines are flagged individually without stopping the rest.
How the conversion works
An IPv4 address is one 32-bit unsigned integer written as four 8-bit octets. To recover the octets from the decimal number, divide repeatedly by powers of 256 and keep each quotient and remainder:
a = ⌊n / 16,777,216⌋, r₁ = n mod 16,777,216
b = ⌊r₁ / 65,536⌋, r₂ = r₁ mod 65,536
c = ⌊r₂ / 256⌋, d = r₂ mod 256
The weights 16,777,216 / 65,536 / 256 / 1 are 256³, 256², 256¹ and 256⁰ — each octet holds exactly 8 bits, and 2⁸ = 256. The same result comes from bit shifts, which isolate one byte at a time: a = (n >>> 24) & 255, b = (n >>> 16) & 255, c = (n >>> 8) & 255, d = n & 255.
Only whole numbers from 0 to 4,294,967,295 (2³² − 1) are valid. Negative numbers, decimals, text, and anything above the maximum are rejected with an honest error instead of a guessed answer.
Every result is also labeled with its legacy IP class (A–E) and its scope — private (RFC 1918), loopback, shared carrier-grade NAT space (RFC 6598), link-local, multicast, documentation, or public — so you can see at a glance what kind of address a decimal number hides.
Going the other way? The IP to Decimal Converter turns an IPv4 address back into its decimal integer.
Frequently asked questions
Free tool by NRTechStudio