Address ranges / BROWSER TOOL
IP Range to CIDR Converter
Convert an inclusive IPv4 range into the smallest exact list of CIDR blocks. Reverse the calculation to find every address covered by a CIDR.
ADDRESSES IN RANGE
- First address
- 192.0.2.10
- Last address
- 192.0.2.50
- CIDR blocks needed
- 6
The blocks cover precisely the supplied addresses, with no gaps, overlaps or additional space.
Why one range can need several CIDRs
A CIDR block must have a power-of-two size and start at the matching address boundary. Arbitrary start and end addresses rarely line up with one such block. This tool chooses the largest aligned block that fits at the current starting point, then repeats until it reaches the final address.
Example: 192.0.2.10 through 192.0.2.50
The inclusive range contains 41 addresses. Exact coverage requires six blocks: 192.0.2.10/31, 192.0.2.12/30, 192.0.2.16/28, 192.0.2.32/28, 192.0.2.48/31 and 192.0.2.50/32. A covering /26 would be shorter to write, but would include addresses outside the requested range.
Frequently asked questions
Can I use the result in an allowlist or firewall?
The result gives exact address coverage. Before applying it, check that the policy really should treat every included address the same way, and that your firewall accepts the prefix lengths. It does not inspect routing, ownership or the effects of an existing rule order.
Why does CIDR to range change my entered address?
An input such as 198.51.100.99/24 contains host bits. Its containing network is 198.51.100.0/24, covering .0 through .255. The output normalizes the prefix; it does not treat .99 as the beginning of a 256-address range.
Are network and broadcast addresses excluded?
No. This is a range converter, so all addresses covered by the CIDR are counted. If you need conventional assignable host boundaries, use the IPv4 subnet calculator. Address coverage and assignment to hosts are different questions.
Can it convert the entire IPv4 address space?
Yes. The range from 0.0.0.0 to 255.255.255.255 becomes 0.0.0.0/0, representing 4,294,967,296 addresses. The converter works on integer boundaries and never expands the range into billions of individual entries.
Check an exact allowlist
The worked IP range to CIDR example covers 56 addresses with three blocks and shows the extra addresses introduced by broader shortcuts.
Apply the result carefully
For several local networks, use the VLSM planner. When organizing firewall groups, read the MikroTik address-list guide and keep the difference between mathematical coverage and intended access explicit.
Reference
RFC 4632: classless routing, prefixes and address aggregation.
PUT THE RESULT TO WORK
Guides that use this calculator
IP Range to CIDR: Build an Exact Allowlist
Convert an IPv4 range into exact CIDR blocks, compare broader shortcuts, and test the boundary addresses before using the result in an allowlist.
Proxmox Networking: Bridges, VLANs, Bonds, and Isolation
Understand Proxmox bridge and VLAN design, avoid management lockouts, and verify routing and isolation before changing a live host.
IPv6 /56 to /64: An Address Plan for Four VLANs
Split a delegated IPv6 /56 into separate /64 LANs. Work through four VLAN prefixes, distinguish WAN addressing from delegation, and check the plan.
IPv6 in a Homelab: Check the Firewall Policy Alongside IPv4
Build a dual-stack access matrix for a homelab. Separate router and forwarded traffic, preserve essential ICMPv6, and verify allowed and denied service paths.
MikroTik Address Lists: Organise Firewall Policy Clearly
Create and review RouterOS address lists while keeping interface scope, service permissions, dynamic entries, and trust boundaries explicit.
MikroTik Backups and Firewall Logs: Build a Recovery Routine
Separate RouterOS backups from text exports, protect operational data, and use focused firewall logging with a tested recovery process.