Convert IP Range to CIDR List
Convert an IP range (start and end) into the smallest list of equivalent CIDR blocks. An essential tool for configuring firewalls, ACLs and network rules.
—
Turning an IP range into CIDR blocks
A vendor tells you to allow 10.0.0.1 through 10.0.5.255. Your firewall field, your bucket policy and your security group all want CIDR notation. Doing that translation by hand is tedious and easy to get wrong, and a wrong block either opens addresses you never meant to open or leaves out the exact IP your customer calls the API from.
The algorithm is greedy and walks from the start toward the end. At each step it picks the largest aligned block that begins at the current address without running past the finish, writes that CIDR down and moves on. Alignment drives the length of the list: 10.0.0.1 to 10.0.5.255 produces eleven blocks, starting with a lonely /32. Shift the start to 10.0.0.0 and the same span collapses to two, 10.0.0.0/22 and 10.0.4.0/23.
If the list comes back too long for your rule field, try aligning the edges to powers of two, since one spare address at the boundary often halves the output. The result is exact and never includes an IP outside the range you gave, unlike the old habit of rounding everything up to a /24. A start above the end returns an error, and only IPv4 is accepted. Everything is computed in your browser.
Frequently asked questions
Why did a small range turn into eleven blocks?
Does the list match the range exactly?
Does it work with IPv6?
Related Tools
Overlapping CIDR Detector
Detect overlapping or duplicate CIDR blocks in a list — useful for firewall reviews, AWS Security Groups and ACLs.
IPv6 CIDR Visual Explainer
Explain an IPv6 prefix visually: hex breakdown, address count, expanded/compressed range — quick reference for SREs.
Summarize CIDR Blocks to Supernet
Aggregate multiple IPv4 CIDR blocks into the smallest supernet that contains them all — free online tool for network admins.
Split CIDR into N Equal Subnets
Split a CIDR block into N equal-sized subnets — a one-page visual VLSM calculator.
Email Header Analyzer
Analyzes a raw email header: Received server chain, per-hop delays, SPF, DKIM, DMARC results and spoofing warning signs.
Atbash Cipher Decoder
Decode and create messages in the Atbash cipher, which swaps each letter for its opposite in the alphabet (A↔Z, B↔Y). Shows the full map and the result.