Skip to content

ip

1,541 1 88 MIT
2.0.1 (13 Oct 2025) Aug 15 2012 35.6 million (month)

The "ip" library is a Node.js library that provides utility functions for working with IP addresses. It provides functions for parsing, validating, and converting IP addresses between different formats.

The "ip" library provides a simple and easy-to-use interface for working with IP addresses in Node.js. It can be useful in a variety of contexts, such as when creating a network-related application or when working with IP addresses in a web application.

Example Use


const ip = require('ip');

// check IP validity:
console.log(ip.isV4Format('192.168.1.1')); // true
console.log(ip.isV4Format('2001:0db8:85a3:0000:0000:8a2e:0370:7334')); // false

// check subnets
console.log(ip.cidrSubnet('192.168.1.1/24')); // { networkAddress: '192.168.1.0', broadcastAddress: '192.168.1.255' }
console.log(ip.not('255.255.255.255')); // '0.0.0.0'

Alternatives / Similar


634 10.7.6 (2026-11-03 16:58:46 ago) May 05 2015 compare
6,918 10.0.0 (2026-10-21 12:25:29 ago) Nov 13 2013 compare
6,222 0.1.3 (2022-06-28 06:09:19 ago) Jun 18 2013 compare

Other Languages

1,329 0.9.0 (2026-10-09 19:53:47 ago) Dec 28 2012 compare
1,506 1.3.3 (2026-07-03 19:48:56 ago) Feb 14 2011 compare
url
109 v2.2.0 (2026-01-06 19:06:56 ago) Apr 15 2018 compare
Was this page helpful?