Wildcard Mask Calculator
Convert a subnet mask to its wildcard (inverse) form. Enter any IP and CIDR (e.g. 192.168.1.0/24) to get the subnet mask and wildcard mask. Used in Cisco ACLs and OSPF. Runs in your browser.
Get the Wildcard Mask
Enter any IPv4 address and CIDR (e.g. 192.168.1.0/24), then click Get wildcard.
Result
| CIDR | /24 |
|---|---|
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
What Is a Wildcard Mask?
A wildcard mask is the bitwise complement of a subnet mask. In the subnet mask, 1 bits indicate the network portion and 0 bits the host portion. In the wildcard mask, 0 bits indicate "must match" and 1 bits indicate "don't care." So for a /24 subnet mask 255.255.255.0, the wildcard is 0.0.0.255. It is used in access control lists (ACLs) and in OSPF network statements to match a range of IPs.
To convert: subtract each octet of the subnet mask from 255. 255.255.255.0 → 0.0.0.255; 255.255.0.0 → 0.0.255.255. This tool displays both the subnet mask and the wildcard for any CIDR. The CIDR calculator explains prefix length; the network address calculator and broadcast address calculator cover the first and last addresses of the range.
How to Use Wildcard Masks
In a Cisco ACL you might write: permit ip 192.168.1.0 0.0.0.255 any. Here 192.168.1.0 is the network address and 0.0.0.255 is the wildcard (equivalent to /24). This tool gives you the wildcard for any CIDR. For the full IP range that the wildcard represents, use the IP range calculator or IP range generator. Validate IPs with IP address validator.
Wildcard vs Subnet Mask
Subnet masks are used in IP configuration (e.g. 255.255.255.0 on an interface). Wildcard masks are used in match conditions (ACLs, OSPF). Same range, different representation. Our tools help you move between CIDR, subnet mask, wildcard, network address, and broadcast address. For geolocation of an IP in your range use IP lookup; for connectivity use ping test or traceroute.
FAQs
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. Where the subnet mask has 1s for network bits, the wildcard has 0s; where the mask has 0s for host bits, the wildcard has 1s. Used in ACLs and some routing.
How do I convert subnet mask to wildcard?
Subtract each octet of the subnet mask from 255. For 255.255.255.0 the wildcard is 0.0.0.255. Our subnet calculator shows both mask and wildcard.
Where are wildcard masks used?
Cisco ACLs (access lists), OSPF network statements, and some firewall rules use wildcard masks to match IP ranges.
Is wildcard the same as CIDR?
No. CIDR is a prefix length (e.g. /24). Wildcard is the inverted subnet mask (e.g. 0.0.0.255 for /24). They describe the same range differently.