Ad slot — header (728x90)

Subnet Mask Converter

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.

Open the full subnet calculator →

How CIDR Prefix and Subnet Mask Relate

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.

Full CIDR ⇄ Subnet Mask Reference Table

CIDRSubnet MaskWildcard MaskTotal IPsUsable Hosts

Frequently Asked Questions

How do I convert a CIDR prefix to a subnet mask?

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.

What is the difference between a subnet mask and a wildcard mask?

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.

What subnet mask is /24?

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.

Related Guides

Ad slot — footer (728x90)