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.
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.255Netmask, 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.
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 1Convert 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.
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.255Six 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.