Decimal to IP Address Converter

Convert a 32-bit decimal integer back into a dotted IPv4 address.

Decimal
IP addresses
Runs locally in your browser

About the Decimal to IP Address Converter

This tool reverses IP-to-decimal: it takes a 32-bit integer and writes it as a dotted IPv4 address, so 3232235777 becomes 192.168.1.1. It is useful when addresses are stored as numbers in a database or log and you need the readable form back. Values must be within 0 to 4294967295, the 32-bit range; anything outside is reported.

Convert several at once, one per line. To go the other way, use IP to Decimal.

Splitting the integer is four divisions, or four shifts and masks if you prefer: the first octet is the number divided by 16777216, the second is the remainder divided by 65536, the third is that remainder divided by 256, and the last octet is whatever is left. Doing it by hand is easy to get wrong by one power of 256, which is the usual cause of an address that looks plausible but points somewhere else entirely.

Addresses arrive as integers from analytics exports, firewall logs and older schemas, which stored them that way because a numeric column indexes and compares faster than a dotted string. A value that comes out negative was written by something using signed 32-bit integers, Java among them; add 4294967296 to it first and it converts normally. Binary to IP does the same job starting from bit strings.

How to use

  1. Paste integers, one per line.
  2. Copy the IPv4 addresses.

Common questions

What range is valid?
0 to 4294967295, the range of a 32-bit unsigned integer.
Does it work for IPv6?
No, only IPv4 fits in a 32-bit integer.
What does 3232235777 convert to?
192.168.1.1.