Technology · Tool #059

IPv4 Wildcard Mask Calculator

Convert an IPv4 CIDR prefix into subnet and wildcard masks.

Reserved ad space · responsive display

Inputs

Convert an IPv4 CIDR prefix into subnet and wildcard masks.

Result

Result
—

More Information

How to use this calculator

Understand IPv4 wildcard masks commonly used in access control lists and network matching. A wildcard mask indicates which address bits must match and which may vary.

How the calculation works

A wildcard bit of 0 means compare that address bit; a bit of 1 means ignore it. For a contiguous subnet mask, wildcard mask = 255.255.255.255 minus the subnet mask, octet by octet.

Worked example

The subnet mask 255.255.255.0 corresponds to wildcard 0.0.0.255. A match using 192.168.10.0 with that wildcard covers addresses 192.168.10.0 through 192.168.10.255.

Understanding the result

Wildcard masks are especially common in router ACL syntax and some routing protocol configurations. They are not interchangeable with subnet masks even though their bits are complementary.

Assumptions and limitations

Some wildcard masks are noncontiguous, so they cannot be represented by one ordinary CIDR prefix. Confirm the exact semantics of the networking platform before applying a rule.

Frequently asked question

Is 0.0.0.0 a wildcard for everything? No. It requires an exact match of all bits; 255.255.255.255 ignores every bit.

Reserved ad space · content placement