IP range to CIDR notation

Convert IP address ranges to CIDR notation blocks

IP range to CIDR notation
Examples:
10.0.0.1 - 10.0.0.255
172.16.0.0 - 172.16.255.255
172.16.0.0 172.16.255.255 (space separated)
How to use this tool
What is CIDR notation?

CIDR notation is a way to represent a subnet or interval of IP addresses in a compact format. It's written as an IP address followed by a slash and a number (e.g., 192.168.1.0/24). The number after the slash indicates the size of the network — a smaller number means more IP addresses (e.g., /24 = 256 addresses, /16 = 65,536 addresses). Sometimes an IP address range can't be represented as a single CIDR block, so it may be split into multiple CIDR blocks, as few as possible.

Input format
  • Use format: start_ip - end_ip
  • Example: 192.168.1.1 - 192.168.1.100
  • Both addresses must be valid
  • Start IP must be less than or equal to end IP
Use cases
  • Network configuration
  • Firewall rules configuration
Example conversions
  • 192.168.1.0 - 192.168.1.255192.168.1.0/24
  • 10.0.0.1 - 10.0.0.10Multiple CIDR blocks
Compatibility
  • Works with both IPv4 and IPv6