Network Tools
CIDR Range Calculator and IP Range to CIDR Converter
Get the first and last IP, address count, mask and host range of a CIDR block, split IP ranges into exact CIDR blocks, merge lists and check if an IP is inside.
How to use CIDR Range Calculator and IP Range to CIDR Converter
Enter one CIDR block, address with mask or IP range per line, such as 10.0.0.0/22 or 10.0.0.5 - 10.0.0.20; results update as you type. Add an IP to check whether it is inside, or tick Merge to combine the list into the fewest blocks.
- Enter CIDR blocks or rangesType one per line: 10.0.0.0/22, 10.0.0.0 255.255.252.0 or 10.0.0.5 - 10.0.0.20. Up to 500 lines.
- Optionally check an IPEnter an address in Check whether an IP is inside to see which of your lines contain it.
- Merge or copy the resultsTick Merge into the fewest CIDR blocks to tidy an allowlist, then press Copy result.
Reading CIDR notation
CIDR writes a block as address/prefix, and the block holds 2^(32 − prefix) addresses: 65,536 for a /16, 4,096 for a /20 and 256 for a /24. For 10.0.0.0/22 the mask is 255.255.252.0, the range runs from 10.0.0.0 to 10.0.3.255, and 1,022 of the 1,024 addresses are usable hosts. If you type an address with host bits set, such as 192.168.1.77/24, a warning explains that it was treated as 192.168.1.0/24, which is a quick way to find the network an IP belongs to. A bare IP with no prefix is read as a single /32.
Converting IP ranges and merging blocks
A CIDR block must be a power-of-two size that starts on a matching boundary, so an arbitrary range usually needs several blocks. The range 10.0.0.5 - 10.0.0.20 splits into 10.0.0.5/32, 10.0.0.6/31, 10.0.0.8/29, 10.0.0.16/30 and 10.0.0.20/32: five blocks covering exactly 16 addresses. With Merge into the fewest CIDR blocks ticked, overlapping and adjacent entries are combined, so 10.0.0.0/25, 10.0.0.128/25 and 10.0.1.0/24 become the single block 10.0.0.0/23. That is useful for tidying firewall allowlists and cloud security group rules.
Accuracy and data handling
Network and domain data can change; record the lookup time and verify important findings in the authoritative account or service. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
What IP range does a /24 cover?
A /24 covers 256 addresses. For 192.168.1.0/24 that is 192.168.1.0 to 192.168.1.255, with 192.168.1.1 to 192.168.1.254 usable for hosts.
How do I convert an IP range to CIDR?
Type the range as start - end, for example 10.0.0.5 - 10.0.0.20. It is split into the fewest CIDR blocks that cover exactly those addresses, with the first IP, last IP and size of each.
How do I check if an IP is in a CIDR range?
Enter your blocks, then type the address in Check whether an IP is inside. The note lists every line that contains it, or says it is not inside any of them.
Does it work with IPv6 CIDR blocks?
No, only IPv4 is supported. Entering an IPv6 address shows a message saying so.
More Network Tools
Related toolsConvert downtime into uptime %, nines, SLA status, error budget and MTTR.
Allowed downtime for any SLA per day, week, month and year, or SLA from downtime.
Check a domain's MX records, mail server IPs and email provider.
List a domain's TXT records and see which are SPF, DMARC, DKIM or verification.
Validate an SPF record, follow includes and count lookups against the limit of 10.
Check a DMARC record: policy, reports, alignment, errors and protection level.