CIDR Calculator

  • Free forever
  • No sign-up
  • Runs in your browser
Processed on your device

Turn a CIDR block into an IP range, a range into CIDR blocks, merge a list of blocks, or check if an IP is inside. IPv4 and IPv6.

About CIDR Calculator

Handles the four CIDR jobs that come up when writing firewall rules, allow lists and route tables: turning a block into its first and last address, turning any start and end address into the fewest exact blocks, merging a messy list of blocks into the smallest set, and checking whether one IP falls inside a list. IPv4 and IPv6 both work, and lists of blocks copy in one click.

How to use CIDR Calculator

  1. Choose what you want to do: CIDR block to IP range, IP range to CIDR blocks, Merge, or Check.
  2. Fill in the boxes that appear: a CIDR block, a start and End address, or a list of blocks.
  3. For Check, also enter the IP address to check, then click Calculate or press Enter.
  4. Read the result: first and last address, a list of blocks with a Copy button, or a yes or no answer.

How your data is handled

All the calculations run in your browser on your device. The blocks and addresses you enter aren't sent to any server and aren't stored.

How SAA Tool works · Privacy Center

Limits and accuracy

  • Start and end addresses must both be IPv4 or both IPv6; mixed lists are merged separately by version.
  • A block written with host bits set, such as 10.0.0.5/24, is treated as its network, 10.0.0.0/24.
  • Usable host counts assume the usual network and broadcast addresses, and are shown for IPv4 only.

Questions and answers

How do I convert an IP range to CIDR?

Choose IP range → CIDR blocks, enter the start and end addresses and click Calculate. You get the smallest list of blocks that covers exactly that range, ready to copy into a firewall or allow list.

Does the CIDR calculator work with IPv6?

Yes. Every mode handles both IPv4 and IPv6 blocks, but the start and end of a range must be the same version.

What does merging CIDR blocks do?

It combines overlapping and neighbouring blocks into the fewest possible, so 10.0.0.0/24 and 10.0.1.0/24 become 10.0.0.0/23. It's handy for tidying firewall rules and route lists.

Do I need to sign up?

No. CIDR Calculator is free with no sign-up, no login and no daily limit, and there's nothing to install. It works on a phone as well as a PC.

Can I turn an IP range into CIDR blocks?

Yes. Choose 'IP range → CIDR blocks', type the start and end address, and it gives the smallest set of blocks that covers the range. It also merges lists of blocks and checks whether an IP is inside a list.

Sources and standards

Related guides

Report a problem with this tool