Home/Network/CIDR to Netmask Converter

CIDR to Netmask Converter

This converter moves between the two ways of writing a subnet size: the short CIDR prefix such as /26 and the long dotted decimal netmask such as 255.255.255.192. Enter a prefix and it gives you the mask, or enter a valid mask and it gives you the prefix, so it works in both directions from a single screen. This is a frequent chore when translating between cloud console fields that expect a mask and router or firewall syntax that expects a slash prefix. It validates that a mask is contiguous, meaning the one bits are all on the left, which is the only form a real subnet mask can take, and it flags masks that are not valid. Everything is computed locally in your browser with simple bit math, so no address information is ever sent anywhere.

How to use CIDR to Netmask Converter

  1. Enter a CIDR prefix like /26 or a dotted decimal mask.
  2. Read the converted value.
  3. Copy the mask or prefix.

Frequently asked questions

What does this converter do?

It turns a CIDR prefix such as /26 into its dotted decimal subnet mask, 255.255.255.192, and back the other way.

How does the prefix relate to the mask?

The prefix is the count of leading one bits in the mask, so /26 means the first 26 bits are ones and the rest are zeros.

What prefixes are valid?

IPv4 prefixes run from /0, meaning no network bits, to /32, meaning a single host, and every value in between is supported.

What is CIDR to Netmask Converter?

This converter moves between the two ways of writing a subnet size: the short CIDR prefix such as /26 and the long dotted decimal netmask such as 255. 255.

Is CIDR to Netmask Converter free to use?

Yes. CIDR to Netmask Converter is completely free, with no sign-up and no usage limits.

Does CIDR to Netmask Converter work in a web browser?

Yes. CIDR to Netmask Converter runs in any modern web browser. There is nothing to download or install.

Is my data private with CIDR to Netmask Converter?

Yes. CIDR to Netmask Converter runs entirely on your device in your browser, so nothing you enter is uploaded to a server.