CIDR Notation Converter
Bulk-convert between CIDR blocks, IP ranges, netmasks, and wildcard masks with range aggregation. Free, fast, and works entirely in your browser with no sign-up required.
Updated
CIDR Notation Converter
Bulk-convert between CIDR blocks, IP ranges, netmasks, and wildcard masks. Includes range aggregation into minimum CIDR blocks.
Bulk CIDR → IP Range
About CIDR Notation
CIDR (Classless Inter-Domain Routing) expresses an IP network as a base address plus a prefix length, e.g. 192.168.1.0/24. This tool handles four common bulk conversions for IPv4.
The Range → CIDR tab uses a greedy aggregation algorithm to produce the minimum set of CIDR blocks that exactly cover an arbitrary IP range — useful for firewall rules, ACLs, and routing tables.
Frequently Asked Questions
What does it do?
Four IPv4 conversions in bulk: CIDR to IP range, IP range to minimum CIDR blocks, netmask to/from CIDR, and wildcard to CIDR. Paste one entry per line, export CSV.
How does range-to-CIDR work?
Greedy algorithm: at each step find the largest CIDR aligned to the start and fitting the remaining range. Produces the minimum set of CIDRs exactly covering the range — useful for firewall rules and ACLs.
How is it different from Subnet Calculator?
Subnet Calculator analyzes a single subnet in depth. CIDR Converter is optimized for bulk conversion and range-to-CIDR aggregation, accepting many entries at once.
Is the CIDR Notation Converter free to use?
Yes, the CIDR Notation Converter is 100% free with no registration, no hidden fees, and no usage limits. All processing happens locally in your browser, ensuring complete privacy.
Is my data safe with this tool?
Absolutely. The CIDR Notation Converter processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.
Does the CIDR Notation Converter work on mobile devices?
Yes, the CIDR Notation Converter is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.
Do I need to create an account to use this tool?
No account or registration is needed. Simply open the CIDR Notation Converter in your browser and start using it immediately. There are no sign-up walls or usage restrictions.
How do I use the CIDR Notation Converter?
Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.
Which browsers are supported?
The CIDR Notation Converter works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.
How many IP addresses are in a /24 or /16 CIDR block?
The number of addresses in an IPv4 CIDR block is 2 to the power of (32 minus the prefix length). A /24 fixes 24 bits and leaves 8 for hosts, giving 2^8 = 256 total addresses; a /16 leaves 16 host bits for 2^16 = 65,536 addresses. Each step down in prefix doubles the size: /25 holds 128, /23 holds 512, and so on. Of those, two addresses are usually reserved — the network address and the broadcast address — so a /24 offers 254 usable hosts rather than 256. This tool's CIDR to Range tab does the math for you, reporting the network, broadcast, first and last usable host, total addresses, and usable count for every block you paste. Enter your prefixes one per line to see all the figures at once.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask and a wildcard mask describe the same network boundary but are bitwise inverses of each other. A subnet mask like 255.255.255.0 has 1-bits for the network portion and 0-bits for hosts, and it is what you type into most operating systems and routers. A wildcard mask, 0.0.0.255, flips every bit and is the form Cisco ACLs and OSPF configurations expect. Both correspond to a /24 prefix, just written differently. The common mistake is pasting a netmask where a wildcard is required, which silently matches the wrong addresses. This converter shows the netmask, wildcard, and CIDR prefix side by side so you can copy the exact form each system needs. Use the Netmask to CIDR and Wildcard to CIDR tabs to translate between all three notations instantly.
Why does an IP range convert into several CIDR blocks instead of one?
A single CIDR block can only represent ranges whose size is a power of two and whose start address is aligned to that size. An arbitrary start-to-end range rarely meets both conditions, so it must be split into several aligned blocks that together cover it exactly. For example, 192.168.1.10 to 192.168.1.20 cannot be one block, but it can be expressed as a few smaller CIDRs with no addresses spilling outside the range. The Range to CIDR tab uses a greedy algorithm: at each step it picks the largest block aligned to the current start that still fits, then advances. This yields the minimum number of blocks, keeping firewall rules and routing tables short. Paste a start and end range to see the smallest exact CIDR set.
How many usable hosts does a /31 or /32 subnet have?
A /32 represents a single host address, so it has exactly one usable IP and is commonly used for loopback interfaces, host routes, and pinning one machine in a firewall rule. A /31 is a special case defined by RFC 3021 for point-to-point links: instead of wasting two of its four-bit-wide pair on network and broadcast, both addresses are usable, giving two usable hosts. For every larger block the usual rule applies — total addresses minus the network and broadcast leaves the usable count, so a /30 yields four addresses but only two usable hosts. This converter handles these edge cases correctly, reporting one usable host for a /32 and two for a /31 rather than zero. Paste any prefix into the CIDR to Range tab to confirm the exact usable count.
What does a 'non-contiguous netmask' error mean?
A valid IPv4 subnet mask must be a clean run of 1-bits followed by a clean run of 0-bits, with no gaps — for example 255.255.255.0 is 24 ones then 8 zeros. A non-contiguous mask is one where the set bits are interrupted, such as 255.0.255.0, which mixes ones and zeros in a way that has no corresponding CIDR prefix length. Masks like this cannot be expressed as a /n value and are rejected by virtually all modern routing equipment, so the converter flags them rather than producing a misleading result. The same validation applies to wildcard masks, which must be contiguous after inversion. If you see this error, check for a typo or a value that was meant to be a different octet pattern. The tool validates every line as you paste, so invalid entries are caught immediately.
Related Tools
Free Secure Password Generator
Generate secure, random passwords with customizable options. Free, fast, and works entirely in your browser with no sign-up required.
Free UUID/GUID Generator
Generate universally unique identifiers (UUIDs/GUIDs). Free, fast, and works entirely in your browser with no sign-up required.
Free QR Code Generator Online
Create QR codes for URLs, text, WiFi, and contacts. Customize colors, size, and error correction. Free, private — runs in your browser, no sign-up.
Free JSON Formatter & Validator
Format, validate, and beautify JSON data with syntax highlighting and error detection. Free, fast, and works entirely in your browser with no sign-up required.
About the CIDR Notation Converter
The CIDR Notation Converter is a free tool for translating between the different ways an IPv4 network can be written: CIDR blocks, IP ranges, subnet netmasks, and wildcard masks. It is built for bulk work — paste many entries, one per line, and every line is converted at once. Network engineers, sysadmins, and developers reach for it when they are writing firewall rules, building access control lists, documenting IP allocations, or just trying to confirm exactly which addresses a block covers.
CIDR (Classless Inter-Domain Routing) writes a network as a base address plus a prefix length, such as 192.168.1.0/24. The prefix is the number of leading bits that are fixed; the rest identify hosts. A /24 fixes 24 bits and leaves 8 for hosts, which is 256 addresses. This converter takes the guesswork out of those calculations and handles all four directions in a single interface.
Four conversions in one tool
The tool is organized into four tabs, each accepting many lines of input:
- CIDR to Range — expands a block into its network address, broadcast address, netmask, wildcard, first and last usable host, and total host count. For example,
192.168.1.0/24becomes the range192.168.1.0 – 192.168.1.255with 256 total addresses and 254 usable. - Range to CIDR — takes an arbitrary start–end range and returns the minimum set of CIDR blocks that cover it exactly, with no addresses outside the range.
- Netmask ↔ CIDR — converts a dotted netmask like
255.255.255.0to its prefix/24(and back from/16-style input), reporting the equivalent wildcard and host count. - Wildcard to CIDR — turns a Cisco-style wildcard mask such as
0.0.0.255into the matching prefix and netmask.
Each tab has a "Load Sample" button so you can see the expected format immediately, plus a "Download CSV" option to export every converted row for documentation or import into a spreadsheet.
How range aggregation works
The Range to CIDR feature is the heart of the converter. It uses a greedy aggregation algorithm: at each step it picks the largest CIDR block that is aligned to the current start address and still fits inside the remaining range, then advances past it. The result is the minimum number of blocks that exactly cover the range — never more, never fewer addresses than you asked for. This matters because firewall rules, routing tables, and cloud security groups are written in CIDR, not free-form ranges. Collapsing 10.0.0.0 – 10.0.1.255 into the single block 10.0.0.0/23 keeps rule sets short and readable.
Why netmasks and wildcards both appear
The same boundary can be written three ways, and different systems expect different forms. A subnet mask like 255.255.255.0 is what you type into most operating systems and routers. A wildcard mask, 0.0.0.255, is the bitwise inverse and is what Cisco ACLs and OSPF configurations use. The CIDR prefix /24 is the compact form used in documentation and modern tooling. Seeing all three side by side prevents the classic mistake of pasting a netmask where a wildcard belongs. The tool validates input as you go and flags problems such as a non-contiguous mask — one where the set bits are not a clean run, which is not a valid netmask.
Privacy and scope
Every conversion runs entirely in your browser. Nothing you paste is uploaded to a server, so internal IP plans and infrastructure details stay on your own device. There is no sign-up, no usage limit, and no software to install, and the page keeps working offline once loaded. Note that the converter is built for IPv4; it does not currently process IPv6 addresses. For analyzing a single subnet in depth, pair it with the Subnet Calculator — this tool is tuned for bulk conversion and range aggregation across many entries at once.