CIDR calculator - Convert IP ranges and check containment or overlap
Convert CIDR and IP ranges, and check containment and overlap
Results
Enter values and calculate to see the results.
About this tool
- Convert IPv4 CIDR to an IP address range, check whether an IP is contained in a range, and compare CIDR blocks.
- Convert an IP range into the smallest set of CIDR blocks that covers it exactly. CIDR input with host bits is normalized before display.
- All calculations run in your browser. Your IP address and CIDR are not sent externally or stored. IPv4 only is currently supported.
How to use
Choose a calculation
Choose CIDR to IP range, IP containment, CIDR comparison, or IP range to CIDR.
Enter IPv4 values and calculate
Enter an IPv4 CIDR or start and end IP addresses in the required fields, then select Calculate or press Enter.
Copy a result
Select Copy for a CIDR or IP address. For IP range to CIDR, you can also copy the entire list as newline-separated text.
Frequently asked questions
What is CIDR?
It is a notation for a network range that combines an IP address with a prefix length. For example, /24 means the first 24 bits are the network portion.
How is the IP range for a CIDR determined?
The start IP has its host bits set to 0 according to the network mask for the prefix length; the end IP has its host bits set to 1.
How do you check whether an IP is within a CIDR?
The tool checks whether the IP is greater than or equal to the CIDR's start IP and less than or equal to its end IP. Both boundaries are included.
Can two CIDR blocks partially overlap?
No. IPv4 CIDR blocks are power-of-two ranges aligned to the same boundaries. Two blocks are identical, one contains the other, or they do not overlap.
What does converting an IP range to CIDR mean?
It means dividing the range from the start IP to the end IP into as few CIDR blocks as possible, without including addresses outside the range.
What happens if I enter a CIDR with host bits set?
Input such as 192.168.10.34/24 is accepted and displayed aligned to the network boundary as 192.168.10.0/24.
Does this tool support IPv6?
No. The initial implementation supports IPv4 only. IPv6 support may be considered separately.
Are my IP address and CIDR sent externally?
No. Calculations run in your browser. The tool does not call external APIs or DNS, or store your input history.