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
What is the valid range for an IPv4 decimal?
0 to 4294967295 (2³² - 1). 0.0.0.0 is decimal 0 and 255.255.255.255 is decimal 4294967295. Anything outside that range is not a valid IPv4 address.
Why do some browsers accept a plain number as a URL?
Historically, browsers accept the integer form of an IPv4 address, so http://3232235777 resolves to http://192.168.1.1. Attackers sometimes use this to obfuscate links, which is one reason to recognize the format.
Related Tools
This tool runs entirely in your browser - nothing you enter is uploaded or stored.