Converts IP address ranges like 192.168.1.1-192.168.1.255 into CIDR notation (192.168.1.0/24). Access via GET /v1/ip/range-to-cidr or through MCP in Cursor and other AI editors. Essential for network configuration, firewall rules, and subnet planning where CIDR format is required but you only have start/end IPs.
curl "https://tinyfn.io/v1/ip/range-to-cidr" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/range-to-cidr', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/ip/range-to-cidr',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's ip address tools:
{
"mcpServers": {
"tinyfn-ip": {
"url": "https://tinyfn.io/mcp/ip",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Send a GET request to /v1/ip/range-to-cidr with start and end IP parameters, or use the MCP tool in your AI editor. It returns the equivalent CIDR blocks that cover the range.
The tool returns multiple CIDR blocks that collectively cover your range. For example, 192.168.1.5-192.168.1.20 might return several /32 and smaller blocks.
Yes, the tool supports both IPv4 and IPv6 ranges. IPv6 ranges work the same way but return IPv6 CIDR notation like 2001:db8::/64.
Firewalls, routing tables, and cloud security groups typically require CIDR notation rather than start-end ranges. This tool bridges that gap.
AI agents using MCP can instantly convert IP ranges from logs or configs into CIDR format needed for AWS security groups, iptables rules, or Kubernetes network policies.
Get your free API key and start using Range To Cidr in seconds.
Get Free API Key