IP Range to CIDR Converter — CIDR to Range Online Convert IP ranges to minimal CIDR blocks and back.
100% offline
Input27 chars · 1 lines
Output63 chars
4 CIDR blocks
192.168.1.10/31
192.168.1.12/30
192.168.1.16/30
192.168.1.20/32

About IP Range to CIDR Converter — CIDR to Range Online

An IP range like 192.168.1.10 – 192.168.1.20 is easy for people to read, but firewalls, ACLs, and routing tables usually want CIDR notation instead. This IP range to CIDR converter turns any arbitrary IPv4 start–end range into the smallest set of CIDR blocks that covers it exactly — no extra addresses, no gaps — and converts a CIDR back into its first address, last address, and total count.

It's the tool you reach for when summarizing routes, writing security-group rules, or auditing what a /18 actually spans. The math is a classic greedy aggregation over the 32-bit address space, so the result is always the minimal covering set.

Everything runs locally in your browser as pure address arithmetic. Nothing you type — internal ranges, firewall rules, customer subnets — is ever uploaded or logged.

Features

  • Convert any IPv4 start–end range into the minimal set of covering CIDR blocks
  • Expand a CIDR into its first address, last address, and total count
  • Exact, gap-free coverage — the smallest possible block list every time
  • Pure 32-bit math, fully offline; your ranges never leave the device

How to use

  1. Choose "Range → CIDR" and enter a start and end IP (as "start - end" or on two lines), or choose "CIDR → Range" and enter a block like 10.0.0.0/8.
  2. Read the result: the minimal list of CIDR blocks, or the start, end, and address count.
  3. Copy a single CIDR line, or copy the whole output, straight into your ACL or route config.

Frequently asked questions

What does "minimal set of CIDR blocks" mean?

A single arbitrary range rarely lines up with one power-of-two CIDR block. The converter finds the fewest aligned blocks that cover the range exactly — no address outside the range, and none missed. For example, 192.168.1.10–192.168.1.20 needs four blocks, not one.

Why can't my range be a single CIDR?

CIDR blocks must start on a power-of-two boundary and have a power-of-two size. A range whose start isn't aligned, or whose length isn't a power of two, must be split into several blocks. Aligned ranges like 192.168.1.0–192.168.1.255 collapse to one (/24).

How many addresses does a CIDR contain?

A /n block holds 2^(32 − n) addresses. A /24 is 256, a /16 is 65,536, and a /32 is a single host. This tool shows the exact count, including the network and broadcast addresses.

Does this handle IPv6?

No — this converter is IPv4-only and works on the 32-bit address space. For IPv6 prefixes and expansion, use a dedicated IPv6 tool.

Is my data sent anywhere?

No. All parsing and CIDR math happens locally in your browser. Internal ranges, firewall rules, and subnets never leave your device.

Everything runs locally in your browser — your input is never uploaded.