IP range to CIDR converter
A range such as 192.168.1.10 to 192.168.1.200 is rarely one CIDR block. This tool finds the smallest set of blocks that matches it exactly.
Why a range needs several blocks
A CIDR block is aligned: it starts at an address whose free bits are all zero, and it is a power of two long. A range that starts at 192.168.1.10 and ends at 192.168.1.200 does not line up with any single block, so it has to be covered by several. The tool uses the standard method: at each step, take the largest block that starts at the current address and does not go past the end, then continue after it.
An example, step by step
The worked example for 192.168.1.10 - 192.168.1.200 is calculated at the bottom of this page, with every block listed.
Uses
- Firewall rules and security groups that accept only CIDR blocks, when your list is a range.
- Allow lists from a provider who gives a range.
- Checking whether two lists describe the same addresses.
Why the list is "shortest"
The method gives the minimum number of blocks that covers the range exactly, with no address outside it. A shorter list that includes extra addresses would open more than you intended.
Common mistakes
- Rounding up to one big block to save typing. It adds addresses that you did not mean to include.
- Entering the addresses in the wrong order. The tool swaps them, but check what you meant.
- Forgetting that IPv6 ranges need a different tool; this one is for IPv4.
We checked the method against Python's ipaddress.summarize_address_range on 300 random ranges, and the lists were identical.
Can a single address be a range?
Yes, the answer is one /32.
Is the list unique?
For a given range the shortest exact list of aligned blocks is unique.
The worked example, calculated
192.168.1.10/31192.168.1.12/30192.168.1.16/28192.168.1.32/27192.168.1.64/26192.168.1.128/26192.168.1.192/29192.168.1.200/32
That is 8 blocks for 191 addresses (192.168.1.10 to 192.168.1.200). They were calculated with Python's ipaddress module when this page was built, and the tool above gives the same list.
This is an independent guide. It is not connected with IANA, the IETF or any network equipment maker. Address and port data come from the IANA registries as fetched on 14 November 2026; RFC texts were read from rfc-editor.org. Check the originals for anything you rely on.