Last reviewed: May 2026
Convert instantly between CIDR prefix length (e.g. /24), dotted-decimal subnet mask (255.255.255.0), wildcard mask (0.0.0.255), and binary. Type any one format below and the rest update automatically.
A subnet mask is just a CIDR prefix written in dotted-decimal form. The prefix length tells you how many leading bits are set to 1. Those 1 bits identify the network; the remaining 0 bits identify hosts. For example, /26 means 26 ones followed by 6 zeros:
11111111.11111111.11111111.11000000 → 255.255.255.192
The wildcard mask is the exact inverse — flip every bit — and is what Cisco IOS uses in access control lists and OSPF network statements.
| CIDR | Subnet Mask | Wildcard Mask | Total IPs | Usable Hosts |
|---|
Write the prefix length as that many 1 bits followed by 0 bits across 32 bits, then group into four octets and convert each to decimal. For example, /26 is 11111111.11111111.11111111.11000000, which is 255.255.255.192.
A wildcard mask is the bitwise inverse of a subnet mask. Where the subnet mask has a 1, the wildcard has a 0, and vice versa. For example, the subnet mask 255.255.255.0 has the wildcard mask 0.0.0.255. Wildcard masks are used in Cisco ACLs and OSPF network statements.
A /24 prefix equals the subnet mask 255.255.255.0, with the wildcard mask 0.0.0.255. It provides 256 total addresses and 254 usable hosts.