Subnet Mask Converter โ Free Online Tool
Convert between CIDR prefix and dotted-decimal subnet mask.
About Subnet Mask Converter
The Subnet Mask Converter translates between CIDR prefix lengths and dotted-decimal subnet masks in both directions. Pick a prefix to get the mask, wildcard mask, and host count, or enter a mask to find its prefix.
It's a quick reference for configuring routers, switches, firewalls, and ACLs where one device wants a prefix and another wants a dotted mask. Everything runs locally in your browser.
How to Use Subnet Mask Converter
- To go from CIDR: choose a prefix from the dropdown.
- To go from a mask: type a dotted-decimal mask like 255.255.255.0 and click Convert.
- Read the matching prefix, mask, wildcard mask and usable hosts.
- Use the value your device or config expects.
Key Features
CIDR prefix to subnet mask
Subnet mask to CIDR prefix
Wildcard mask output
Usable host count per prefix
100% client-side and private
Frequently Asked Questions
How do I convert CIDR to a subnet mask?
Select a CIDR prefix (for example /26) and the tool shows the dotted-decimal subnet mask (255.255.255.192), the wildcard mask, and the number of usable hosts.
Can I convert a subnet mask back to CIDR?
Yes. Enter a valid dotted-decimal mask such as 255.255.255.0 and the converter returns the matching CIDR prefix (/24).
What is a wildcard mask?
A wildcard mask is the bitwise inverse of the subnet mask. It is used in access control lists (ACLs) on routers, for example 0.0.0.255 corresponds to a /24.
Does it work offline / privately?
All conversions run in your browser with no server calls, so your input stays private.