Skip to content
ToolPlankDEV
Developer Tools
100% In-Browser Execution

Updated:

CIDR to IP Range Converter

Paste CIDR blocks, one per line, and get the cidr to ip range for each: first and last address, netmask, wildcard and usable hosts. IPv4 and IPv6 can be mixed. Merge overlaps and test which block holds an address. Nothing is uploaded.

Options:

CIDR blocks

Input
0 chars · 0 lines

IP ranges

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Summary and checks

Counts, lines that need fixing and the results of the IP check appear here.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use CIDR to IP Range

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your CIDR blocks

    Type or paste one block per line, or open a .txt or .csv file. Commas and spaces also separate blocks. IPv4 and IPv6 can share one list, and a bare address such as 203.0.113.7 is read as a single-address block. Example loads a mixed list, and the sample buttons load a cloud allowlist, small subnets and a messy list.

  2. 02

    Read the ranges

    The result shows the first and last address of every block as you type. Table adds the netmask, wildcard, broadcast and host counts. Start - end writes one range per line, CSV is ready for a spreadsheet and Address list writes every address.

  3. 03

    Fix lines and merge blocks

    The summary names every line that failed and why. A line such as 10.0.0.5/24 comes with the corrected block, and Host bits set to Fix applies the correction for you. Turn on Merge overlaps and neighbors to join blocks and get the smallest set.

  4. 04

    Check an address and download

    Type addresses into Is this IP inside? to see which block holds each one. Press Copy for the text, or Download to save the table, ranges, CSV or address list as a file.

How to convert CIDR to an IP range

A CIDR block such as 192.168.1.0/24 names a network by its first address and a prefix length. The prefix says how many leading bits are fixed. The rest of the bits are free, and they decide the cidr to ip range: the first address has all free bits set to 0 and the last address has all of them set to 1. For a /24 that gives 192.168.1.0 to 192.168.1.255, which is 256 addresses.

This tool does that arithmetic for a whole list at once, for IPv4 and for IPv6. It uses exact integer math, so a /0, a /31 or a /128 gives the same careful answer as a /24. The list is processed in your browser. See the Privacy Policy for what that means.

Text
10.0.0.0/24
10.0.1.0/24
192.168.0.0/16

10.0.0.0 - 10.0.0.255
10.0.1.0 - 10.0.1.255
192.168.0.0 - 192.168.255.255

Netmask, wildcard and host counts

The Table output lists everything a network engineer asks for: the CIDR, first and last usable address, broadcast address, netmask, wildcard mask, total addresses and usable hosts. The netmask is the prefix written as four numbers, 255.255.255.0 for a /24. The wildcard mask is its inverse, 0.0.0.255, which Cisco-style access lists use.

Usable hosts follow the usual rules. A block of /30 or larger loses its network and broadcast addresses, so a /29 has 8 addresses and 6 usable hosts. A /31 has 2 addresses and both are usable, as RFC 3021 allows for point-to-point links. A /32 is one address and it is usable. IPv6 has no broadcast address, so every address counts as usable.

Text
CIDR            First usable  Last usable  Broadcast    Netmask          Wildcard  Addresses  Usable
192.168.1.0/30  192.168.1.1   192.168.1.2  192.168.1.3  255.255.255.252  0.0.0.3   4          2
192.168.1.4/31  192.168.1.4   192.168.1.5  -            255.255.255.254  0.0.0.1   2          2
192.168.1.6/32  192.168.1.6   192.168.1.6  -            255.255.255.255  0.0.0.0   1          1

Convert a CIDR list in bulk

Cloud vendors and CDNs publish hundreds of blocks in one file, and a firewall change often starts from such a list. Paste the whole list instead of converting one block at a time. IPv4 and IPv6 blocks can be mixed, and each line is detected on its own. Text after a hash sign or two slashes is ignored, so you can keep comments, and a header line such as cidr is skipped.

Netmask notation also works: 10.0.0.0/255.255.255.0 is read as 10.0.0.0/24. A mask with gaps in it, such as 255.0.255.0, is reported as an error because no network has that shape.

  • Table, Start - end and CSV keep one row per block. CSV adds the version, prefix and counts so a spreadsheet can sort and filter them.
  • Show integer values adds the first and last address as plain numbers. Databases use them for range lookups.
  • Expanded IPv6 writes all eight groups with leading zeros, which suits tools that compare addresses as text.

Merge overlapping and adjacent blocks

Real lists overlap. One entry may be a /16 and another a /24 inside it, or two /24 blocks may sit side by side. Turn on Merge overlaps and neighbors and the tool joins them, then rewrites the result as the smallest set of CIDR blocks. Start - end shows the joined ranges instead, which can span blocks that no single prefix could name.

Text
52.95.0.0/16
52.95.110.0/24
52.95.111.0/24
52.95.112.0/22
54.240.0.0/18
54.240.0.0/18

52.95.0.0 - 52.95.255.255
54.240.0.0 - 54.240.63.255

Six lines became two ranges. The summary reports how many blocks the merge saved. To turn a range back into prefixes, use IP Range to CIDR, which also aggregates and excludes.

Check whether an IP is in a CIDR range

Type one or more addresses into Is this IP inside? and the summary lists, for each address, the most specific block that contains it, or says that no block does. A /24 inside a /8 is reported as the /24. The check uses every block you pasted, even when Merge is on, so the answer names a block you recognize.

This helps when a log shows an address and you need to know which allowlist entry covers it, and when you want to test a whole set of addresses before a rule goes live. An IPv4 address is never matched against an IPv6 block.

Lines with host bits set

10.0.0.5/24 is a common mistake. The /24 says the first 24 bits name the network, but the address has a 5 in the part that should be zero. Many tools silently round it down. This one lists the line, tells you the block you probably meant, which is 10.0.0.0/24, and leaves it out of the result so a typo does not slip into a firewall rule.

If you know the list is sloppy and the rounded-down blocks are what you want, set Host bits set to Fix. The lines are corrected and each change is listed in the notes. Other problems, such as an octet above 255, a prefix above 32 for IPv4 or above 128 for IPv6, or a leading zero in an octet, are always reported with the line number.

Limits and when not to use it

  • The address list writes at most 65,536 addresses. Larger blocks produce a warning and the first 65,536 lines. The other outputs are not capped.
  • The tool does arithmetic only. It does not look up who owns a block, where it is located or whether anything answers on it, because that needs a server.
  • IPv6 zone identifiers such as %eth0 are rejected, and an address with a leading zero in an octet is rejected because some systems read it as octal.
  • IPv4-mapped IPv6 addresses such as ::ffff:192.0.2.1 are treated as IPv6, not as IPv4.

To tidy a list before converting it, Sort Lines and Remove Duplicate Lines help. Compare Two Lists shows what changed between two versions of an allowlist. If your addresses sit inside web links, URL Parser pulls out the host part first.

Frequently Asked Questions

Technical Q&A for CIDR to IP Range

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the block, for example 192.168.1.0/24, and read the first and last address, 192.168.1.0 and 192.168.1.255. The prefix fixes the leading bits and the remaining bits run from all zeros to all ones.

Paste the blocks, then type the address into Is this IP inside?. The summary names the most specific block that contains it, or says that no block does.

A /24 has 256 addresses and 254 usable hosts, a /29 has 8 and 6, and a /31 has 2 and 2. The network and broadcast addresses are not usable except in a /31 or /32.

Because it is not a network address. A /24 needs the last octet to be 0, so the block you mean is 10.0.0.0/24. Set Host bits set to Fix to correct such lines automatically.

Yes. IPv6 blocks give the first and last address in short or expanded form and the exact number of addresses. IPv4 and IPv6 can be mixed in one list.

Yes. Paste as many blocks as you need, one per line, or open a text or CSV file. Each line is read separately and the problem lines are listed with their line numbers.

The wildcard mask is the netmask with every bit flipped. A /24 has the netmask 255.255.255.0 and the wildcard 0.0.0.255, which some router access lists expect.

Turn on Merge overlaps and neighbors. The tool joins overlapping and touching blocks and writes the smallest set of CIDR blocks, or the joined ranges in Start - end.

Yes. Choose CSV, then download the file or copy the rows into a sheet. It has one row per block with the first and last address, netmask, wildcard and host counts.

It is a group of consecutive IP addresses written as a starting address and a prefix length. CIDR stands for Classless Inter-Domain Routing.

No. The conversion runs in your browser, so a private allowlist stays on your computer.