IP Range to CIDRs
range-to-cidrsUse to prepare an exact CIDR allowlist from one inclusive start/end IPv4 or IPv6 range. Pass start and end IP addresses of the same family, without CIDR prefixes, at most 64 characters each; end must be at or after start. Return canonical range.first and range.last, minimal sorted cidrs, cidrCount, and exact decimal-string addressCount, without adding addresses. Equal endpoints return one /32 or /128; complete address spaces return /0. Invalid inputs identify the start or end field; reversed endpoints are never swapped. Browser calculations stay local; remote MCP calls submit endpoints to this server. This does not inspect live address usage, modify firewall rules, or export vendor-specific ACLs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Inclusive end IP address, in the same family and at or after start. Endpoints are never silently swapped. | |
| start | Yes | Inclusive start IP address. Use IPv4 or IPv6 without a CIDR prefix; surrounding whitespace is ignored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cidrs | Yes | Complete minimal CIDR list, sorted by network address, with no gaps, overlaps, or additional addresses. | |
| range | Yes | Canonical inclusive start and end IP addresses. | |
| family | Yes | ||
| cidrCount | Yes | ||
| addressCount | Yes | Exact number of addresses as a base-10 string, including network and broadcast addresses. |