Wildcard Mask Calculator

Convert IPv4 CIDR prefixes and subnet masks into wildcard masks.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of a subnet mask. Where a subnet mask marks the network portion with 1 bits, a wildcard mask marks it with 0 bits — and marks the host portion with 1 bits. For example, the subnet mask 255.255.255.0 has the wildcard mask 0.0.0.255. Each 0 bit means “must match” and each 1 bit means “can vary”.

Where are wildcard masks used?

Wildcard masks appear mainly in Cisco IOS configuration: in access control lists (ACLs) to match a block of addresses, and in OSPF network statements to select which interfaces participate in routing. Some other vendors use them too, but they are not universal — many systems express the same idea with a CIDR prefix instead.

Example

The network 192.168.1.0/24 has subnet mask 255.255.255.0. Its wildcard mask is 0.0.0.255: the first three octets must match exactly, while the last octet may be any value — matching every address from 192.168.1.0 to 192.168.1.255.

Common wildcard masks

PrefixSubnet MaskWildcard Mask
/8255.0.0.00.255.255.255
/16255.255.0.00.0.255.255
/24255.255.255.00.0.0.255
/30255.255.255.2520.0.0.3
/32255.255.255.2550.0.0.0

Related Tools

  • CIDR Overlap Detector
  • CIDR Summarizer — Coming soon
  • IP Range to CIDR — Coming soon
  • VLSM Planner — Coming soon