pjhtech Tools
Address planning

Netmask to CIDR Converter

Validate an IPv4 subnet mask and recover its prefix length.

Input

Reset restores the example inputs.

Local calculation · inputs are not sent to a server.

Result

Calculating the example…

Enter the dotted-decimal subnet mask. Use the returned /prefix when a route, address or firewall setting requires CIDR notation.

Example: 255.255.254.0 gives /23. This is the mask for an aligned block of 512 addresses.

255.0.255.0 is not a contiguous subnet mask. Do not paste an ACL wildcard here: 0.0.0.255 is a wildcard for /24, not its subnet mask.

References