Wildcard Mask Calculator — For Cisco ACLs and OSPF
Compute exact inverse wildcard masks from netmasks or CIDR for OSPF & ACL rules.
| Input | Wildcard | Prefix | Matching addresses | ACL / OSPF example |
|---|---|---|---|---|
192.168.1.0/24 | 0.0.0.255 | /24 | 256 | access-list 10 permit 192.168.1.0 0.0.0.255 |
10.0.0.0 0.0.255.255 | 0.0.255.255 | /16 | 65,536 | access-list 10 permit 10.0.0.0 0.0.255.255 |
255.255.255.192 | 0.0.0.63 | /26 | 64 | network <ip> 0.0.0.63 area 0 |
172.16.0.0 0.0.255.0non-contiguous wildcard: valid in Cisco ACLs, but has no /prefix equivalent | 0.0.255.0 | — | 256 | access-list 10 permit 172.16.0.0 0.0.255.0 |
When to use the OSPF & Cisco ACL Wildcard Mask Converter
From CIDR, mask or an address pair
Write 192.168.1.0/24, 255.255.255.192 or an address followed by a wildcard. You get the wildcard, its prefix equivalent, the number of matching addresses and a sample config line.
Non-contiguous wildcards
Cisco ACLs accept wildcards such as 0.0.255.0 that match only the third octet. Such wildcards are recognised and explained, not treated as errors. Contiguous ones such as 0.0.0.255 are shown with their /24 equivalent.
Ready sample lines
Every result comes with a sample access-list or OSPF network line with the right address and wildcard, cutting typos during configuration. For a bare mask without an address, the sample uses the OSPF network command.
How many addresses match
The number of covered addresses comes from the 1 bits of the wildcard, so you can see whether a rule is too broad before applying it. A wildcard of 0.0.255.0, for example, matches 256 addresses spread across the third octet.
Frequently asked questions
How is a wildcard calculated?
Subtract each subnet-mask octet from 255. For 255.255.255.192 the wildcard is 0.0.0.63. For /20 it is 0.0.15.255.
Where are wildcards used?
In Cisco IOS standard and extended ACLs, OSPF and EIGRP network commands, and some Juniper and Huawei devices.
What do host and any mean in ACLs?
host 10.0.0.1 equals wildcard 0.0.0.0, and any equals 0.0.0.0 255.255.255.255.
Do all devices support non-contiguous wildcards?
No. Cisco IOS ACLs support them, but OSPF network commands and many firewalls only accept contiguous wildcards.
Is my data sent to a server?
No. Everything is computed in your browser, so internal addresses and ACL rules stay private.
Similar tools
- CIDR Exclusion & WireGuard AllowedIPs BuilderSubtract LAN or private ranges from 0.0.0.0/0 or any block and get the minimal CIDR list for WireGuard, routing or MikroTik.
- CIDR & IP Range to Full Address List ExpanderExpand IPv4/IPv6 CIDRs and start–end ranges into every individual address, ready to export as TXT for scanners and ACLs.
- IP / CIDR List Diff & Allowlist AuditorCompare two IP/CIDR lists by real address coverage: what was added, removed, or overlaps — ideal for firewall allowlist reviews.
- CIDR Aggregator & Supernet Route SummarizerMerge adjacent IPv4 prefixes and contiguous subnets into minimal routing blocks.