Skip to main content

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.

DecimalDivision stepsIPv4 address
3,232,235,7773,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,2954,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
00 ÷ 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,4332,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,072134,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,161167,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,7292,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,2944,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,21616,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,53665,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
256256 ÷ 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
11 ÷ 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

An IPv4 address is really one 32-bit unsigned integer. The dotted form you type every day (like 192.168.1.1) is just human-friendly notation: each of the four octets is one byte (8 bits) of that integer, i.e. one digit in a base-256 number system. The decimal form is that same integer written out in full — the value computers, databases and socket APIs actually store and compare. Converting decimal back to dotted form splits the integer into its four base-256 digits again.
Divide repeatedly by powers of 256 and keep the quotients and remainders: a = floor(n / 16777216), r1 = n mod 16777216; b = floor(r1 / 65536), r2 = r1 mod 65536; c = floor(r2 / 256), d = r2 mod 256. For 3232235777: a = 192 (remainder 11010305); b = 168 (remainder 257); c = 1 (remainder 1); d = 1 — so 3232235777 = 192.168.1.1. This tool shows that exact division table for every conversion.
The smallest is 0 = 0.0.0.0 and the largest is 4294967295 = 255.255.255.255, which is 2^32 - 1. Every integer in that range maps to exactly one IPv4 address and back — it is a perfect one-to-one mapping. Anything negative or above 4294967295 has no IPv4 equivalent, and this tool rejects it instead of guessing.
Whenever a system hands you the integer form: databases that store IPs in INT UNSIGNED columns, server logs and analytics exports with numeric IPs, geolocation database dumps, firewall rule exports, and packet captures. If you need the reverse direction, the IP to Decimal Converter turns a dotted address into its integer.
Yes. INET_NTOA(3232235777) returns '192.168.1.1' using exactly the same byte-splitting math, and INET_ATON() is its inverse. In Python the equivalent is socket.inet_ntoa(struct.pack('!L', 3232235777)). This tool gives you the same answer interactively, with every step shown.
This tool converts the whole 32-bit value into a dotted-decimal IPv4 address, where every octet stays in base 10. A decimal-to-octal converter instead rewrites the integer in base 8, and an IP-to-octal notation writes each octet in octal (so 192.168.1.1 would appear as 300.250.1.1). Same address, different number bases — pick this tool whenever you need the standard dotted-decimal IPv4 form.
The first octet places the address in a legacy class (A–E), and the full address is matched against the special-use registries: private ranges (RFC 1918: 10.x.x.x, 172.16–31.x.x, 192.168.x.x), loopback (127.x.x.x), carrier-grade NAT space (RFC 6598: 100.64–127.x.x), link-local, multicast and documentation ranges. The label tells you at a glance what kind of address a decimal number hides.
No. The conversion runs entirely in your browser with JavaScript: nothing is uploaded, logged or stored anywhere. You can safely convert numbers copied from private configs, databases or firewall exports.

Free tool by NRTechStudio