IP Address Utilities

Expand Cidr

Converts CIDR notation into a complete list of individual IP addresses within that network range. Access via MCP in Cursor or Windsurf, or call GET /v1/ip/expand-cidr directly. Perfect for network analysis, security scanning, or IP validation tasks. For example, 192.168.1.0/30 expands to exactly 4 IPs including network and broadcast addresses.

API Endpoint

GET /v1/ip/expand-cidr

Code Examples

curl "https://tinyfn.io/v1/ip/expand-cidr" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/expand-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/expand-cidr',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I expand a CIDR block to see all IP addresses?

Pass the CIDR notation (like 10.0.0.0/24) to the expand-cidr endpoint. Returns an array of all individual IP addresses in that subnet, including network and broadcast addresses.

What's the maximum CIDR block size I can expand?

Large blocks like /8 contain millions of IPs and may hit response limits. Stick to /16 or smaller for practical use cases to avoid timeouts or memory issues.

Does CIDR expansion include network and broadcast addresses?

Yes, the tool returns all addresses in the range including the network address (first) and broadcast address (last). For usable host IPs only, exclude the first and last addresses.

Can I use this with MCP tools for network automation?

Absolutely. In Cursor or Claude Code, the MCP tool lets AI agents expand CIDRs for subnet analysis, IP scanning scripts, or firewall rule generation without manual calculation.

What format does the expanded IP list return?

Returns a JSON array of strings, each containing a valid IPv4 address. Order is sequential from lowest to highest IP in the subnet range.

Try Expand Cidr Now

Get your free API key and start using Expand Cidr in seconds.

Get Free API Key