OSPF Wildcard Mask Helper
Convert between a prefix length / subnet mask and an OSPF wildcard (inverse) mask, and build the network statement for an address.
This tool handles input and primary processing in your browser and is designed not to send the input to QuickKit’s server.
Result
| Subnet mask | — |
|---|---|
| Wildcard mask | — |
| Prefix length | — |
| Contiguous mask | — |
| Fixed (must-match) bits | — |
| Addresses matched | — |
| Address entered | — |
| Network (address AND mask) | — |
| Match range | — |
| Address has host bits set | — |
| network statement | — |
How it works
Cisco IOS `network <address> <wildcard-mask> area <id>` statements and IOS ACLs use an inverse mask: a 0 bit must match, a 1 bit is "don't care". Enter a prefix (/24 or 24), a subnet mask (255.255.255.0), or a wildcard mask (0.0.0.255) to get the other forms. Use the "second value is" selector to say whether a dotted mask is a subnet mask or a wildcard mask; auto-detect works for every value except 0.0.0.0 and 255.255.255.255, which are valid as both and are reported as ambiguous until you choose. Add an address in front (10.20.30.0 0.0.0.255 or 10.20.30.0/24) to see the network the statement anchors on, the full range of addresses it matches, and the `network` line. The area ID is yours to supply — OSPF has no universal default area for a network statement; leave the field blank to get an `area <area-id>` placeholder. A wildcard need not be contiguous: an ACL-style mask such as 0.0.255.0 is reported with its fixed-bit count and match count but no single prefix or range. The tool does no routing; verify generated statements against the device configuration and the OSPF process you are adding to.