Cidr Calculator
Convert an IPv4 CIDR prefix length to its dotted-decimal subnet mask.
Result for the values shown.
Calculations run in your browser.
What to enter
| Input | Meaning and units |
|---|---|
| Prefix length | integer 0..32 OR mask string |
Understanding your result
The output applies the selected format or address convention. Encoding is not encryption; a valid address representation does not establish availability, reachability or security.
Common mistakes
- Using a different alphabet, padding, base, delimiter or address-prefix convention than the tool expects.
Check your calculation
- Where a reverse operation exists, round-trip a short known example. Compare structural results with the reference example rather than executing decoded text.
Calculation checks, sources and review limits
What IPv4 subnet mask corresponds to this CIDR prefix length?
Convert an IPv4 CIDR prefix length to its dotted-decimal subnet mask.
Common uses
- Convert an IPv4 CIDR prefix length to its dotted-decimal subnet mask.
How it works
A prefix length counts the contiguous leading one bits in a 32-bit IPv4 mask. This tool converts a prefix length from 0 to 32 into a mask.
Worked example
Enter Prefix length: 20. The result is Mask: 255.255.240.0; Prefix: 20.
FAQ
What IPv4 subnet mask corresponds to this CIDR prefix length?
A prefix length counts the contiguous leading one bits in a 32-bit IPv4 mask. This tool converts a prefix length from 0 to 32 into a mask.
What assumptions and limits apply?
Inputs and results must stay within the stated supported ranges.