Wildcard Mask Calculator

Convert IPv4 subnet masks and wildcard masks for ACL, OSPF, and route-matching workflows.

IPv4 ACL syntax Mask inverse

Mask Conversion

Invert each octet safely so matching rules use the intended address range.

Subnet mask Wildcard Copy results

What This Tool Does

This page converts IPv4 subnet masks and wildcard masks without changing the existing form or result cards. The added content explains the operational meaning: wildcard masks are most often used in ACL and routing syntax where host bits are written as match-any values.

Inputs explained

Enter either a standard subnet mask such as 255.255.255.0 or a wildcard mask such as 0.0.0.255. Use the matching conversion button for the direction you need.

How it works

The math is straightforward. A wildcard mask is the inverse of the subnet mask, calculated by subtracting each octet from 255. Converting back simply inverts the same values again.

Wildcard Mask Calculator

Mask ↔ Wildcard

Result

Subnet Mask
Wildcard Mask

Step-by-Step Example

Convert 255.255.255.0 to wildcard notation by subtracting each octet from 255. The result is 0.0.0.255. Reversing the process gives you the original subnet mask again.

Use Cases

Use wildcard conversion when building ACL rules, route filters, or training materials for platforms that expect inverse mask syntax.

Assumptions and limitations

The output is exact mathematical inversion. It does not decide whether your target platform expects a host mask, wildcard mask, or CIDR prefix in a specific command.

Wildcard Mask vs Subnet Mask

A wildcard mask is the inverse of a subnet mask and is common in Cisco ACLs. A /24 subnet mask is 255.255.255.0, so the wildcard mask is 0.0.0.255. Use this wildcard mask calculator as a wildcard calculator, wildcard mask converter, cisco wildcard calculator, cisco wildcard rechner, calculateur wildcard mask, or wildcard addresse convertisseur when you need ACL-ready notation.

To convert subnet mask to wildcard mask, subtract each octet from 255. Example: 255.255.254.0 becomes 0.0.1.255. The same rule also helps when a typo such as wildcast mask calculater or wilcard mask 23 appears in old notes.

Frequently Asked Questions

How do I calculate a wildcard mask?

To calculate a wildcard mask, subtract each subnet mask octet from 255. For example, subnet mask 255.255.255.0 becomes wildcard 0.0.0.255. Mask 255.255.255.224 becomes 0.0.0.31. In Cisco-style matching, a 0 bit means the bit must match, and a 1 bit means the bit can vary. That is why wildcard masks look like the inverse of subnet masks. They are used in ACLs, OSPF network statements, and route matching. A calculator helps avoid mistakes during configuration.

What is the wildcard mask for 255.255.255.0?

The wildcard mask for 255.255.255.0 is 0.0.0.255. The rule is simple: subtract each octet from 255. So 255 - 255 = 0 for the first three octets, and 255 - 0 = 255 for the last octet. In an ACL, 192.168.1.0 0.0.0.255 matches any address from 192.168.1.0 to 192.168.1.255. The wildcard does not describe usable hosts; it describes which bits the router should ignore while matching traffic.

How do I convert a subnet mask to a wildcard mask?

To convert a subnet mask to a wildcard mask, write the subnet mask in dotted decimal and subtract every octet from 255. For 255.255.255.192, the wildcard is 0.0.0.63. For 255.255.0.0, it is 0.0.255.255. This is the inverse-mask idea used in Cisco configurations. After conversion, test the address range mentally or with a calculator. A small mistake in a wildcard mask can make an ACL too broad or too narrow, which can cause outages or security gaps.

What is the wildcard mask for /30?

The wildcard mask for /30 is 0.0.0.3. A /30 subnet mask is 255.255.255.252, and 255 - 252 = 3 in the last octet. A /30 has 4 total IPv4 addresses, with 2 usual usable host addresses, which is why it was commonly used for point-to-point links. In Cisco ACL or OSPF syntax, a network like 10.1.1.0/30 would be written as 10.1.1.0 0.0.0.3. Always confirm the network address is on the correct /30 boundary.

How is a wildcard mask used in an ACL?

In a Cisco-style ACL, a wildcard mask tells the router which bits of the address to check. A 0 means match exactly; a 1 means ignore. For example, access-list logic using 192.168.10.0 0.0.0.255 matches all addresses in 192.168.10.0/24. A host match uses 0.0.0.0 because every bit must match. Wildcards are powerful but easy to mistype. Before applying an ACL, translate the wildcard back to the expected address range and confirm it matches the security intention.

What is the difference between subnet mask and wildcard mask?

A subnet mask separates network bits from host bits. A wildcard mask is the inverse and tells a matching rule which bits can vary. For example, subnet mask 255.255.255.0 corresponds to wildcard 0.0.0.255. In subnetting, the mask helps devices decide whether an address is local. In ACLs and routing protocol statements, the wildcard helps match a group of addresses. The numbers look related because they are, but the purpose is different. Subnet mask is for addressing; wildcard mask is for matching.

How do I calculate an OSPF wildcard mask?

To calculate an OSPF wildcard mask, convert the subnet mask to its inverse. For example, if the interface subnet is 10.10.20.0/24, the OSPF network statement can use 10.10.20.0 0.0.0.255 area 0. For a /30 link, use 0.0.0.3. The wildcard controls which interfaces match the OSPF statement, so accuracy matters. If the wildcard is too broad, you may enable OSPF on unintended interfaces. If it is too narrow, the expected interface may not participate in OSPF at all.

Sources & References

Related Tools

IPv4 Subnet Calculator

Calculate masks, host counts, and IPv4 boundaries.

IPv4 Range to CIDR

Convert raw IPv4 spans into prefixes before building rules.

Compare IPv4 Subnets

Validate that planned networks and ACL scopes do not overlap.