Menu

Search tools and guides

DMARC & DKIMCheck DMARC and DKIM, generate records and keys
SPF Record CheckerValidate SPF and count lookups against the limit of 10
DNS Blacklist CheckerCheck IPs and mail servers against spam blocklists
Email Header AnalyserTrace hops, delays and SPF/DKIM/DMARC in raw headers
Email ValidatorSyntax, MX, SPF and DMARC verification
DNS LookupQuery A, AAAA, MX, TXT, NS and more
WHOIS LookupRegistration data over RDAP
Website StatusAvailability and response-time checks
Ports ReferenceWhat runs on each TCP and UDP port, and if it's safe
MAC Address LookupFind a MAC address vendor and check if it's random
Download Time CalculatorHow long a file takes at your broadband speed
QR Code GeneratorQR codes for Wi-Fi, links and text, as PNG or SVG
User Agent ParserWhat your browser says about itself, decoded
IP ConverterDecimal, hex, binary and IPv6 conversion
Subnet CalculatorCIDR ranges, masks and subnet splitting
CIDR AggregatorMerge IPs and ranges into the fewest CIDR blocks
SSL CheckerInspect certificates, chains and expiry
HTTP HeadersAudit security headers and redirect chains
Password GeneratorCryptographically secure random passwords
Hash GeneratorMD5, SHA-1, SHA-256, SHA-384 and SHA-512
JWT DecoderDecode JWT claims and verify HS256, RS256, ES256
Unix Timestamp ConverterConvert epoch seconds or ms to UTC and UK time
UUID GeneratorGenerate UUID v4, v7 and ULIDs; decode any UUID
Cron Expression ExplainerCron schedules in plain English, with next runs
Regex TesterTest JavaScript regex with live match highlighting
Chmod CalculatorUnix permissions as octal, symbols and commands
Colour Contrast CheckerWCAG contrast ratio for text and background colours
JSON FormatterPretty-print, minify and validate JSON
Base64 EncoderConvert to and from Base64, Unicode safe
URL EncoderPercent-encode and decode URL strings
HTML EntitiesEscape and unescape HTML special characters
Text Diff CheckerCompare two texts line by line, word by word
Word & Character CounterWords, characters, reading time and SMS segments
Case ConverterUPPER, lower, Title Case, camelCase and more
URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs
DNS records explained: A, AAAA, CNAME, MX, TXT, NS and the restWhat each common DNS record type does, the rules that trip people up – CNAMEs at the root, MX pointing at an IP – and how TTL and caching really work.
Mbps and MB/s: why downloads look slower than your broadband speedWhy a 100 Mbps line downloads at 12 MB/s, why a 1 TB drive shows 931 GB, what slows real transfers, and what a UK advertised average speed promises.
Setting up SPF, DKIM and DMARC for Microsoft 365Step by step for a domain on Microsoft 365, from the first SPF record to a DMARC policy of reject, avoiding the mistakes that cause bounces.
SPF "too many DNS lookups": why it happens and how to fix itWhat the ten-lookup limit in RFC 7208 counts, how to tally your own record, and the fixes that work without silently breaking mail.
How to read a DMARC aggregate reportA field-by-field tour of the XML that receivers send to your rua= address, and how to turn it into a list of senders to fix before you enforce.
What your IP address reveals – and what it does notHow IP geolocation really works, why it often puts you in the wrong town, what a website can and cannot learn from your address, and how UK law treats it.
Diagnosing a website that will not load: DNS, TLS and HTTP in orderA methodical checklist for working out whether an outage is DNS, the certificate, the server or just you – and what each kind of failure looks like.

Arrow keys move through results, Enter opens one, Escape closes.

CIDR Aggregator & IP Range Converter

Merge addresses, CIDR blocks and ranges into the fewest possible blocks, subtract exclusions, and see the first and last address of every block.

One per line (commas and spaces also work). IPv4 and IPv6 can be mixed. Ranges are written first-last, or 192.168.1.10-20 for a last-octet range. Text after # is ignored.

Try:

Anything listed here is removed from the result, for example an office range that must stay out of an allow-list.

About CIDR aggregation and range conversion

Firewall rules, cloud security groups, allow-lists and route tables all describe address space as CIDR blocks. Lists of those blocks tend to grow untidily: a range copied from a supplier's documentation, a few single addresses added during an incident, two halves of a subnet entered on different days. This tool takes whatever you paste, works out exactly which addresses it covers, and rewrites it as the smallest possible set of CIDR blocks that covers precisely the same addresses, no more and no fewer.

What it accepts

  • Single addresses such as 203.0.113.7 or 2001:db8::1, treated as a /32 or /128.
  • CIDR blocks such as 198.51.100.0/24 or 2001:db8::/48. If the address has host bits set, as in 192.168.1.77/24, it is treated as the network that contains it (192.168.1.0/24) and a note says so.
  • Ranges written first-last, with or without spaces round the hyphen, plus the common IPv4 shorthand 192.168.1.10-20 for a range within one last octet.

Entries can be separated by new lines, commas, semicolons or spaces, and anything after a # is treated as a comment, so you can paste a commented allow-list straight from a configuration file. IPv4 and IPv6 can be mixed; they are aggregated separately and listed IPv4 first.

How the merging works

Every entry is converted to a numeric interval: a start address and an end address. IPv4 addresses are 32-bit numbers and IPv6 addresses are 128-bit numbers, so the tool uses JavaScript's arbitrary-precision BigInt arithmetic throughout rather than ordinary floating-point numbers, which cannot represent IPv6 exactly. The intervals are sorted, and any that overlap or touch (one ends at x and the next starts at x + 1) are joined into one. Exclusions are then cut out of the merged intervals.

Finally each interval is split into CIDR blocks greedily: starting at the first address, take the largest block that is correctly aligned on that address and does not run past the end of the interval, then repeat from the address after it. This produces the minimum number of blocks for each interval, which is the same result as Python's ipaddress.collapse_addresses and router "summarisation" commands.

Worked examples

192.168.0.0/25 + 192.168.0.128/25 + 192.168.1.0/24
→ 192.168.0.0/23 (512 addresses, one block)

The two /25s are halves of 192.168.0.0/24, and that /24 sits directly before 192.168.1.0/24 on an even boundary, so all three collapse into a single /23.

10.0.0.1-10.0.0.254
→ 10.0.0.1/32, 10.0.0.2/31, 10.0.0.4/30, 10.0.0.8/29, 10.0.0.16/28,
   10.0.0.32/27, 10.0.0.64/26, 10.0.0.128/26, 10.0.0.192/27, … 10.0.0.254/32

A range that does not start and end on block boundaries needs several blocks: fourteen in this case. If your firewall accepts ranges directly, the range is the tidier rule; if it only accepts CIDR, these fourteen are the shortest exact equivalent.

The "Public IPv4 only" example starts with 0.0.0.0/0 (every IPv4 address) and subtracts the three private ranges from RFC 1918. The answer is 31 blocks, which is why "everything except private addresses" is usually written as a deny rule followed by an allow rule instead.

Reading the results

The summary counts how many entries were read and how many blocks came out, with the total number of addresses covered for each family. The table lists every block with its first and last address and its size, which is the reverse conversion from CIDR to range. Use the output format menu to copy the list as CIDR blocks, as merged first-last ranges, or as address and netmask pairs for older IPv4 equipment that does not understand prefix lengths. Short inputs are saved in the address bar, so Copy link shares exactly what you are looking at; inputs over 2,000 characters are left out of the link to keep URLs a sensible length.

Limitations

  • Merging is exact. The tool never widens a block to make the list shorter, so it will not invent a /16 to cover two distant /24s. If you want deliberate over-coverage, decide on the wider block yourself.
  • IPv4 addresses with leading zeros (such as 010.1.1.1) are rejected, because different software reads them as octal or decimal. Zone indexes such as fe80::1%eth0 are rejected too.
  • IPv4-mapped IPv6 addresses (::ffff:192.0.2.1) are treated as IPv6, which is what they are; they are not merged with the IPv4 list.
  • Very large lists are fine, but the details table shows the first 1,000 blocks to keep the page responsive. The copied list always contains everything.

Privacy

Everything happens in your browser. The addresses you paste are not sent to IP Pigeon or anyone else, which matters when the list describes your own network. The only thing that leaves the page is the shareable link, and only if you copy it.

Common questions

What is CIDR aggregation?

CIDR aggregation is the process of combining several adjacent or overlapping IP address blocks into fewer, larger blocks that cover exactly the same addresses. It is also called route summarisation or supernetting. For example, 192.168.0.0/25 and 192.168.0.128/25 aggregate into the single block 192.168.0.0/24, which shortens firewall rules and routing tables without changing what they match.

Can any two adjacent subnets be merged into one CIDR block?

Two adjacent subnets can be merged into one CIDR block only if they are the same size and the first one starts on a boundary of the larger block. 192.168.0.0/24 and 192.168.1.0/24 merge into 192.168.0.0/23, but 192.168.1.0/24 and 192.168.2.0/24 cannot, because no /23 begins at 192.168.1.0.

How do I convert an IP range to CIDR notation?

An IP range is converted to CIDR notation by repeatedly taking the largest block that starts at the first remaining address, is correctly aligned on that address and does not run past the end of the range. A range that falls on block boundaries becomes one block; an awkward one such as 10.0.0.1 to 10.0.0.254 needs fourteen.

What does 0.0.0.0/0 mean?

0.0.0.0/0 means every IPv4 address. A prefix length of zero fixes none of the 32 bits, so the block covers all 4,294,967,296 possible addresses. It is used as the default route in routing tables and to mean any source or destination in firewall rules and cloud security groups. The IPv6 equivalent is ::/0.

Accessibility

Adjust how the site looks and behaves. Your choices are saved in this browser only.

Colour theme
Text size
Accessibility statement