How to use the cidr converter
- Choose direction: CIDR → range, or range → CIDR.
- Enter the input. The tool returns first IP, last IP, total count, and CIDR notation.
- For range → CIDR it finds the minimum spanning prefix.
Convert between CIDR notation and subnet details, or convert a subnet mask to prefix length.
/24 has 256 addresses. The range is 192.168.1.0 through 192.168.1.255, with usable hosts 192.168.1.1 to 192.168.1.254.
Convert both endpoints to binary, find the longest common prefix, then take that prefix as the CIDR. The block size must be a power of 2 and the start must align to it.
A CIDR block must start on a boundary aligned to its size. If your range begins mid-block or crosses uneven allocations, you'll need multiple CIDRs to cover it.
CIDR ditched the rigid class A/B/C boundaries and let you slice networks any way you wanted — /1 through /32. That flexibility opened the door to variable-length subnet masking and route aggregation, two things that made IP space way less wasteful.