Subnet Tools
Wildcard Mask Calculator
Convert a subnet mask to a wildcard mask, or a wildcard mask back to a subnet mask.
How it works
A wildcard mask is the bitwise inverse of a subnet mask. Every bit flips. Where the subnet mask has a 1 (part of the network portion), the wildcard mask has a 0, and the other way around.
This is the same math used for the wildcard mask shown on the IPv4 Subnet Calculator's results panel. This tool just lets you convert a mask on its own, without needing a full IP address and subnet breakdown.
FAQ
- What is a wildcard mask used for?
- Wildcard masks are used mainly in Cisco IOS. Access control lists (ACLs) and OSPF network statements both use a wildcard mask, instead of a subnet mask, to specify which addresses match.
- How is a wildcard mask calculated?
- It's the bitwise inverse of the subnet mask. Every 1 becomes a 0, and every 0 becomes a 1. For example, the subnet mask 255.255.255.0 inverts to the wildcard mask 0.0.0.255.
- Does the conversion work in both directions?
- Yes. Inverting a wildcard mask gets you back the original subnet mask, since bitwise inversion reverses itself. Just pick whichever one you're starting from above.