Subnet Mask Converter
Paste a CIDR prefix, a decimal mask, a wildcard, binary or hex and get all the other representations instantly. Nothing is sent to any server.
Binary representation
network bits (1) host bits (0)
Reference table · /0 to /32
| CIDR | Mask | Wildcard | Hosts |
|---|
Runs locally in your browser · no sign-up · nothing leaves your browser
How it works
The converter translates a network mask across its five representations: CIDR prefix (/0 to /32), dotted-decimal mask, wildcard (the inverted mask used by ACLs), binary grouped by octet, and hexadecimal. You can move the prefix slider or paste any format — /24, 255.255.255.0, 0.0.0.255, 0xffffff00 or the 32 bits in binary — and the tool detects which one it is and fills in the rest.
Internally a valid mask is a contiguous run of ones followed by zeros: the CIDR prefix counts the ones, and the mask as an integer is 2^32 − 2^(32−prefix). The wildcard is the bitwise complement of the mask, and from the prefix the tool also derives the total addresses in the block (2^(32−prefix)) and the usable hosts (total minus network and broadcast, with the /31 and /32 exceptions). A full /0 to /32 reference table is included.
Example: converting /26 to every format
- A /26 has 26 ones and 6 zeros: in binary
11111111.11111111.11111111.11000000. - That binary in dotted decimal is the mask 255.255.255.192, and in hex
0xffffffc0. - The wildcard is the complement: 0.0.0.63. The block has
2^6 = 64addresses and 62 usable hosts.