Wildcard Mask to Subnet Mask Converter
Convert compatible contiguous wildcard masks.
Wildcard Mask to Subnet Mask Converter: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related Masks, Wildcards & ACLAll Tools
IP Address and Mask Calculator
Calculate the corresponding network range.
CIDR to Subnet Mask Converter
Convert IPv4 prefixes to dotted masks.
Subnet Mask to CIDR Converter
Find prefix length from contiguous masks.
Subnet Mask Validator
Check mask structure and contiguity.
Subnet Mask to Wildcard Converter
Calculate the inverse IPv4 mask.
ACL Wildcard Match Calculator
Evaluate address-and-wildcard matching.
How Wildcard Mask to Subnet Mask Converter Works?
This tool works by checking that the wildcard is contiguous, then subtracting each wildcard octet from 255 to produce the subnet mask.
Enter a wildcard
Type a wildcard such as
0.0.3.255.Check compatibility
A wildcard converts to a subnet mask only when its 1 bits form one run on the right.
0.0.255.0fails this check.Subtract from 255
255 − 0, 255 − 0, 255 − 3, 255 − 255 →
255.255.252.0.Return the mask and prefix
The converter shows
255.255.252.0and/22.
Wildcard Mask to Subnet Mask Converter Formula
The formula is Subnet Mask = 255.255.255.255 − Wildcard, valid only when (W AND (W + 1)) = 0.
Conversion
M_i = 255 − W_iPer octet.
Compatibility test
(W AND (W + 1)) = 0W as a 32-bit integer.
Prefix length
p = 32 − log2(W + 1)For 0.0.3.255: W + 1 = 1,024 → p = 22.
Worked example: 0.0.3.255
W = 1,023 → W + 1 = 1,024 = 2^10 1,023 AND 1,024 = 0 → contiguous ✓ Mask = 255.255.252.0 Prefix = 32 − 10 = /22
Wildcard Mask to Subnet Mask Converter Conversion Table
The table converts 12 wildcard masks, including 3 non-contiguous wildcards that have no subnet mask equivalent.
| Wildcard | Contiguous | Subnet Mask | CIDR |
|---|---|---|---|
| 0.0.0.0 | Yes | 255.255.255.255 | /32 |
| 0.0.0.3 | Yes | 255.255.255.252 | /30 |
| 0.0.0.31 | Yes | 255.255.255.224 | /27 |
| 0.0.0.255 | Yes | 255.255.255.0 | /24 |
| 0.0.3.255 | Yes | 255.255.252.0 | /22 |
| 0.0.15.255 | Yes | 255.255.240.0 | /20 |
| 0.0.255.255 | Yes | 255.255.0.0 | /16 |
| 0.255.255.255 | Yes | 255.0.0.0 | /8 |
| 0.0.255.0 | No | No equivalent | — |
| 0.0.254.255 | No | No equivalent | — |
| 0.0.0.254 | No | No equivalent | — |
| 255.255.255.255 | Yes | 0.0.0.0 | /0 |
What is Wildcard Mask to Subnet Mask Converter?
The Wildcard Mask to Subnet Mask Converter is a tool that turns a contiguous ACL or OSPF wildcard mask back into a subnet mask and prefix length.
Wildcards are more flexible than subnet masks. A wildcard such as 0.0.254.255 matches every even third octet, a pattern that no single subnet mask expresses. The converter separates compatible wildcards from non-contiguous ones.
Non-contiguous wildcards still describe valid address sets. The ACL Wildcard to CIDR Converter expands them into a list of CIDR blocks.
What are the uses of Wildcard Mask to Subnet Mask Converter?
There are 4 main uses of the Wildcard Mask to Subnet Mask Converter, including ACL review, migration, and documentation.
Reviewing Cisco ACLs
Reviewers read
0.0.7.255as /21 to confirm the subnet each line covers.Migrating ACLs to other vendors
Platforms that use prefixes need the subnet mask form of each wildcard.
Documenting OSPF areas
Area documentation lists networks in CIDR form, converted from
networkstatements.Spotting unusual wildcards
Non-contiguous wildcards stand out and get a separate review.