Home / CIDR converter
CIDR ↔ Netmask Converter
Type a prefix (/24), a dotted netmask (255.255.255.0) or a full CIDR address (10.0.0.0/8). The converter reads any of the three and fills in the rest.
24 · /24 · 255.255.255.0 · 192.168.1.0/24What the numbers mean
A CIDR prefix is just a count of leading 1 bits in a 32-bit mask. /24 means 24 ones followed by 8 zeros. The remaining bits — 32 minus the prefix — are the host bits, and they decide how large the block is.
Block size
The block size is 2(32 − prefix). For /24 that is 28 = 256 addresses. That number also tells you the step between network addresses: with /24, subnets begin at ….0, ….1.0, ….2.0 and so on.
Wildcard mask
The wildcard mask is the inverse of the subnet mask. Where the mask has a 1, the wildcard has a 0. It is used by ACLs and routing protocols (OSPF, EIGRP) to say “match these bits, ignore those”. /24 gives 0.0.0.255.
Usable hosts
Two addresses in every block are reserved — the network address (all host bits 0) and the broadcast address (all host bits 1). So a standard subnet has 2h − 2 usable hosts. /30, the classic point-to-point prefix, gives 2. /31 is the exception: RFC 3021 lets both addresses be used on a link.
Quick reference
| Prefix | Netmask | Wildcard | Total | Usable |
|---|