Skip to content
My Tiny Utils

Search tools

Type to find a tool, then press Enter to open it.

CIDR Calculator

Expand a CIDR block into its address range and host counts, or turn a first and last IP into the minimal set of CIDR blocks.

Processed locally in your browser — nothing is uploaded.

Enter a CIDR block like 10.0.0.0/16.

About CIDR Calculator

In CIDR mode, a block like 10.0.0.0/16 expands into its first and last address, usable host range, total addresses, and masks. In range mode, you give a first and last IP and get back the smallest set of CIDR blocks that covers exactly that range and nothing more.

Range-to-CIDR is the awkward direction to do by hand: an arbitrary range rarely lines up with a power-of-two boundary, so covering it takes several blocks of different sizes. That is exactly the list a firewall rule, a security group, or an allowlist needs.

Common uses

  • Convert an IP range from a vendor's allowlist into firewall-ready CIDR blocks
  • Check how many addresses a /20 actually contains before allocating it
  • Confirm two CIDR blocks cover the range you promised a customer

Example

Input

192.168.0.1 – 192.168.0.6

Output

192.168.0.1/32 · 192.168.0.2/31 · 192.168.0.4/31 · 192.168.0.6/32

Limitations

  • IPv4 only
  • The blocks cover the range exactly — they are not merged into a larger block that would include addresses outside it