๐Ÿฆ IP Animals
๐Ÿงฎ Subnetting & IP Math

IPv4 to Decimal (Integer) Converter

Turn any IPv4 address into its single 32-bit unsigned integer, and convert integers back to dotted-decimal. Perfect for databases, spreadsheets and code. Everything runs locally in your browser.

Any whole number from 0 to 4,294,967,295.

From dotted decimal to one big number

An IPv4 address is really a 32-bit number wearing a friendly costume. The four octets you see in 192.168.0.1 are just the four bytes of that number written separately. To collapse them into a single integer you weight each octet by its position: the first octet is worth 16,777,216 (224), the second 65,536 (216), the third 256 (28) and the last 1.

So 192.168.0.1 becomes 192 ร— 16777216 + 168 ร— 65536 + 0 ร— 256 + 1 = 3,232,235,521. Because the result is an unsigned 32-bit value, this tool uses JavaScript's >>>0 operator internally so the number is never mistaken for a negative one.

๐Ÿ—„๏ธ Why developers love integer IPs

Stored as a plain 32-bit integer, IP addresses sort numerically, compare in a single CPU instruction, and let a database answer "is this address inside that range?" with a simple BETWEEN. That is far faster and smaller than comparing dotted strings character by character.

Going back the other way

To reverse it, you peel the bytes off with division and remainder (or bit shifts): the top 8 bits give the first octet, the next 8 the second, and so on. Enter any value from 0 (0.0.0.0) to 4,294,967,295 (255.255.255.255) and the tool rebuilds the address instantly.

If you are new to how addresses are structured, start with what is an IP address. To view the same value in other bases, the IP โ†’ Binary converter shows all 32 bits and the IP โ†’ Hex converter shows the hexadecimal form. All three run purely in your browser โ€” nothing you type is ever sent to a server.

Frequently asked questions

How do you convert an IP address to a decimal integer?

Multiply the first octet by 16,777,216, the second by 65,536, the third by 256, and add the fourth. For 192.168.0.1 that is 192ร—16777216 + 168ร—65536 + 0ร—256 + 1 = 3,232,235,521.

What is the range of the integer value?

An IPv4 address maps to an unsigned 32-bit integer, so the value runs from 0 (0.0.0.0) to 4,294,967,295 (255.255.255.255).

Why store an IP as an integer?

Integers sort correctly, compare quickly and use less space than a string. Databases and applications often store IPs as 32-bit integers so that range queries work as expected.

Is my data sent to a server?

No. The conversion runs entirely in your browser with JavaScript. Nothing you enter leaves your device.

Want the theory? Read the guides โ†’ ยท Visit the zoo โ†’