pjhtech Tools
Address planning

CIDR to Netmask Converter

Convert an IPv4 prefix length into a contiguous dotted-decimal subnet mask.

Input

Reset restores the example inputs.

Local calculation · inputs are not sent to a server.

Result

Calculating the example…

Enter a prefix from /0 to /32, with or without the slash. Copy the resulting netmask into a setting that asks for a dotted-decimal IPv4 subnet mask.

Example: /27 gives 255.255.255.224, a block of 32 addresses.

/0 produces 0.0.0.0 and /32 produces 255.255.255.255. A prefix is a bit count, not the number of hosts. IPv6 uses prefix lengths directly rather than IPv4-style dotted masks.

References