CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Network
How-to

How do I find the subnet mask for a CIDR prefix?

Short answer

Enter an IP with the CIDR prefix into a browser-based subnet calculator and it returns the matching dotted-decimal subnet mask, such as 255.255.255.0 for a /24. The conversion happens on your device with no account needed.

CIDR prefix and dotted mask are two views of the same thing

A CIDR prefix like /24 means the first 24 bits are the network portion. Writing those 24 one-bits out and grouping them into four octets gives the dotted-decimal mask 255.255.255.0. Every prefix from /0 to /32 has one exact mask, and a calculator converts between the two forms instantly so you do not have to count bits.

Handy when a device wants one format and not the other

Some tools and routers ask for the CIDR prefix and others ask for the dotted mask, which is a frequent source of confusion. A client-side calculator shows both from a single entry, in your browser, with nothing uploaded. It is free and works on mobile or desktop.

Step by step

  1. Open the calculator. Open the subnet and CIDR calculator in your browser.
  2. Enter IP with the prefix. Type an IP address followed by the CIDR prefix you want to convert.
  3. Read the mask. Read the dotted-decimal subnet mask it displays alongside the prefix.

Frequently asked questions

What mask does /24 map to?

A /24 prefix maps to the subnet mask 255.255.255.0.

Does every prefix have one mask?

Yes. Each CIDR prefix from /0 to /32 corresponds to exactly one dotted-decimal mask.

Is the conversion done online?

No. It runs in your browser, so nothing is sent to a server.

Related answers