Decimal to IP Converter

Convert decimal numbers to IPv4 addresses.

Code Examples

function decimalToIp(num) {
  return [
    (num >>> 24) & 255,
    (num >>> 16) & 255,
    (num >>> 8) & 255,
    num & 255
  ].join('.');
}
decimalToIp(3232235777); // "192.168.1.1"

Frequently Asked Questions

How do I convert a decimal to an IP address?

Extract each octet by dividing and using modulo. For 3232235777: octet4=1, octet3=1, octet2=168, octet1=192 → 192.168.1.1

Related Tools