Wildcard Mask Calculator
Enter a subnet mask or CIDR prefix length to instantly get the wildcard (inverse) mask used in Cisco ACLs and OSPF.
Use the Wildcard Mask Calculator
Wildcard Mask Input
Enter in dotted-decimal format.
Enter a value from 0 to 32.
Common Prefixes
Enter a subnet mask or CIDR prefix, then click Calculate.
Use this value in Cisco ACLs and OSPF network statements.
Conversion Details
Binary Breakdown
| Label | Binary (32 bits) | |||
Must match (0 in wildcard) Ignored (1 in wildcard)
Summary
A wildcard mask is the bitwise inverse of a subnet mask and is used in Cisco ACL permit/deny statements and OSPF network commands to define which bits of an address must match. This calculator converts any subnet mask or CIDR prefix length (0–32) to its corresponding wildcard mask and shows a full binary breakdown. All calculations run entirely in your browser.
How it works
- Enter a subnet mask in dotted-decimal form (e.g. 255.255.255.0) or a CIDR prefix length (e.g. /24 or just 24).
- Click "Calculate" to compute the wildcard mask.
- The wildcard mask is derived by inverting every bit of the subnet mask (255.255.255.255 XOR subnet mask).
- Results include the wildcard mask, subnet mask, CIDR prefix, and a binary breakdown for all four octets.
- Use the "Copy" buttons to paste individual values directly into your router or firewall configuration.
Use cases
- Write Cisco IOS access-list permit/deny statements that match entire subnets.
- Configure OSPF network commands with the correct wildcard mask.
- Verify ACL wildcard masks when troubleshooting traffic filtering.
- Convert subnet masks learned from CCNA studies to wildcard format.
- Generate wildcard masks for BGP prefix-list or route-map entries.
- Double-check firewall rules that use inverse mask notation.
- Quickly identify how many host bits a given wildcard mask covers.
- Support CCIE/CCNP lab practice with instant mask conversion.