CIDR calculator

Convert IP ranges to CIDR blocks and CIDR blocks to IP ranges.

  • Research
  • 100% free & unlimited
  • No sign-up
  • Runs in your browser
CIDR calculator
One per line: a CIDR block (10.0.0.0/24), or a range (first IP - last IP).

What is the cidr calculator?

The CIDR calculator converts in both directions: a CIDR block such as 192.168.0.0/22 becomes its first and last IP address and number of addresses, and a range such as 10.0.0.5 - 10.0.0.20 becomes the smallest list of CIDR blocks that covers it exactly.

Paste many lines at once to build firewall rules, cloud security groups or allow lists.

How to use the cidr calculator

  1. 1Enter CIDR blocks or IP ranges, one per line.
  2. 2The results update while you type.
  3. 3Copy the CIDR list.

Features

Range to CIDR

The minimal set of blocks for any range.

CIDR to range

First and last address and count.

Normalization

Fixes blocks that don't start on a boundary.

Bulk

Up to 500 lines.

Frequently asked questions

What is CIDR notation?

An IP address and a prefix length, e.g. /24, that together describe a range of addresses.

Why does a range give several blocks?

A CIDR block always has a power-of-two size starting on a boundary, so most ranges need several.

Does it support IPv6?

Not yet, IPv4 only.