CIDR Canonicalizer
Normalize prefixes to network boundaries.
CIDR Canonicalizer: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related IPv4 Subnetting & RangeAll Tools
IPv4 Range Calculator
Find address boundaries from a prefix.
IPv4 Subnet Calculator
Calculate subnet details from address and mask.
Network Address Calculator
Find the subnet’s network address.
IPv4 Broadcast Address Calculator
Find broadcast addresses where applicable.
First and Last Address Calculator
Identify a range’s endpoints.
Usable IPv4 Host Range Calculator
Apply the selected subnet-use rules.
How CIDR Canonicalizer Works?
The CIDR Canonicalizer works by clearing every host bit in the address so the entry starts on its prefix boundary. 192.168.1.77/24 becomes 192.168.1.0/24.
Read each CIDR entry
The canonicalizer accepts 1 entry or a list of entries, one per line.
Build the mask
The prefix length sets the mask.
/20gives255.255.240.0.Apply the mask
The canonicalizer runs
address AND mask, which zeroes the host bits.Output canonical form
The tool prints the aligned network with the original prefix and marks which entries changed.
CIDR Canonicalizer Formula
The CIDR Canonicalizer formula is Canonical = (IP AND Mask)/p, where the prefix length p stays the same.
Canonical address
C = IP AND Mask(p)Host bits become 0.
Changed flag
Changed = (C ≠ IP)Marks entries that had host bits set.
Host bits removed
Removed = IP AND Wildcard(p)The value discarded during canonicalization.
Worked example: 172.31.200.9/20
Mask = 255.255.240.0 3rd octet = 200 AND 240 = 192 4th octet = 9 AND 0 = 0 Canonical = 172.31.192.0/20 Removed = 0.0.8.9 (host bits)
CIDR Canonicalizer Conversion Table
The CIDR Canonicalizer conversion table shows 12 input entries and their canonical form, with the host-bit value removed from each.
| Input | Canonical CIDR | Changed | Host Bits Removed |
|---|---|---|---|
| 192.168.1.77/24 | 192.168.1.0/24 | Yes | 0.0.0.77 |
| 10.1.2.3/8 | 10.0.0.0/8 | Yes | 0.1.2.3 |
| 172.31.200.9/20 | 172.31.192.0/20 | Yes | 0.0.8.9 |
| 10.10.10.10/30 | 10.10.10.8/30 | Yes | 0.0.0.2 |
| 203.0.113.200/25 | 203.0.113.128/25 | Yes | 0.0.0.72 |
| 198.51.100.0/24 | 198.51.100.0/24 | No | 0.0.0.0 |
| 100.70.5.5/10 | 100.64.0.0/10 | Yes | 0.6.5.5 |
| 192.168.255.255/16 | 192.168.0.0/16 | Yes | 0.0.255.255 |
| 10.0.15.1/22 | 10.0.12.0/22 | Yes | 0.0.3.1 |
| 172.16.5.4/12 | 172.16.0.0/12 | Yes | 0.0.5.4 |
| 192.0.2.130/26 | 192.0.2.128/26 | Yes | 0.0.0.2 |
| 8.8.8.8/24 | 8.8.8.0/24 | Yes | 0.0.0.8 |
What is CIDR Canonicalizer?
The CIDR Canonicalizer is a tool that rewrites CIDR entries into canonical form, where the address part is the true network address of the prefix.
A CIDR entry such as 10.1.2.3/8 carries host bits that the prefix ignores. Most routers store it as 10.0.0.0/8, but databases, diff tools, and string comparisons treat both forms as different values. Canonical form gives every block exactly 1 spelling.
The canonicalizer keeps the prefix length unchanged. Changing the size of a block is a different operation, covered by the Supernet Calculator and the Prefix Expansion Calculator.
What are the uses of CIDR Canonicalizer?
There are 5 main uses of the CIDR Canonicalizer, including list deduplication, configuration diffs, and database keys.
Deduplicating CIDR lists
10.1.2.3/8and10.0.0.0/8become the same entry after canonicalization, so duplicates disappear.Producing clean config diffs
Canonical entries stop false differences between 2 versions of a firewall or routing file.
Creating database keys
IPAM and CMDB tables use the canonical network as a unique key.
Normalizing user input
Users often type a host address with a prefix. The canonicalizer stores the network instead.
Preparing BGP prefix lists
Prefix lists match canonical networks. Canonicalization prevents entries that never match.