Skip to main content
KalkuNet

CIDR to Subnet Mask Converter — /24 Becomes 255.255.255.0

Convert /1 through /32 CIDR prefix length into netmask, wildcard & usable hosts.

Runs in your browserNetwork · Subnetting, CIDR & Network Maths
InputSubnet maskWildcardTotal addressesUsable
/24255.255.255.00.0.0.255256254
/21255.255.248.00.0.7.2552,0482,046
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011
/8255.0.0.00.255.255.25516,777,21616,777,214

When to use the /CIDR Prefix to Subnet & Wildcard Mask Converter

  • Mask, wildcard and capacity

    Every prefix from /0 to /32 becomes its subnet mask, wildcard mask, total address count and the number of hosts you can really use. For example /26 becomes 255.255.255.192 with wildcard 0.0.0.63, 64 addresses and 62 hosts.

  • For older devices

    Printers, CCTV cameras and industrial devices often only accept a dotted subnet mask. Enter the prefix and copy the right mask.

  • /31 and /32 counted right

    /31 has two hosts for point-to-point links per RFC 3021 and /32 has one host, not zero as some calculators show.

  • Free format

    Write /24 or just 24, one per line, to convert many prefixes at once. Values outside /0 to /32 are flagged in red and left out of the copied or downloaded result.

Frequently asked questions

How do I convert by hand?

Write as many 1 bits as the prefix, then 0 bits up to 32, and convert each 8 bits to decimal. /21 becomes 255.255.248.0.

How many hosts does a /29 have?

8 addresses and 6 usable hosts, a size often used for small public IP blocks from ISPs.

What is a wildcard mask?

The inverse of the subnet mask, used in Cisco ACLs and OSPF. The wildcard for /24 is 0.0.0.255, and for /30 it is 0.0.0.3.

What about the reverse?

Use the Subnet Mask to CIDR converter to turn a dotted mask such as 255.255.240.0 back into /20.

Is my data sent to a server?

No. Everything is computed in your browser, with no server connection.

Learn more