Convert an IP address to a decimal number

This tool converts an IPv4 address into its equivalent decimal number, and a decimal number back into an IP address. This makes it easier to work with IP ranges and geolocation databases.

Example: your current public IP is 216.73.216.143, which in decimal is 3628718223.

IP to decimal converter

Enter the IP address (or the decimal number) and press "Convert".


How is an IP converted to decimal?

An IPv4 address is 4 numbers from 0 to 255 (4 bytes). To get the decimal value, each block is multiplied by a power of 256 and the results are added up: a·256³ + b·256² + c·256 + d. For example, 192.168.1.1 = 192·16777216 + 168·65536 + 1·256 + 1 = 3232235777.

The reverse process consists of repeatedly dividing the decimal number by 256 and keeping the remainders. Geolocation databases and IP ranges are usually stored in decimal form because checking whether an IP falls within a range then becomes a simple numeric comparison.