redzilla
All tools
IP Addressing

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.

255.255.255.0 256 addresses

Accepts CIDR, mask, wildcard, binary or hex.

redzilla.cl — mask
 
CIDR /24
Mask 255.255.255.0
Wildcard 0.0.0.255
Hex 0xffffff00

Binary representation

network bits (1) host bits (0)

Reference table · /0 to /32
CIDRMaskWildcardHosts

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

  1. A /26 has 26 ones and 6 zeros: in binary 11111111.11111111.11111111.11000000.
  2. That binary in dotted decimal is the mask 255.255.255.192, and in hex 0xffffffc0.
  3. The wildcard is the complement: 0.0.0.63. The block has 2^6 = 64 addresses and 62 usable hosts.

Frequently asked questions

How do I get the wildcard from a mask without a calculator?
Subtract each octet from 255. For 255.255.255.192: 255−255 = 0 three times and 255−192 = 63, so the wildcard is 0.0.0.63. It is the form required by Cisco ACLs and by OSPF and EIGRP network statements.
Why is 255.255.255.100 not a valid mask?
Because 100 in binary is 01100100: the ones are interleaved with zeros. A real mask must be contiguous, ones followed only by zeros, so the network and host parts stay cleanly separated. That is why the only valid final octets are 0, 128, 192, 224, 240, 248, 252, 254 and 255, and the tool rejects any other value.
Which mask corresponds to /27 and how many hosts does it allow?
A /27 is the mask 255.255.255.224 (wildcard 0.0.0.31): blocks of 32 addresses with 30 usable hosts. It is a typical size for small server segments or management links.
Does the tool work offline?
Yes. Format detection and every conversion run in your browser with local arithmetic: no data is sent to any server, and you can use it with your internal network numbering.
Was this tool useful?
Disclaimer We take great care to keep every tool accurate and review it thoroughly; even so, we can't guarantee it is free of errors or take responsibility for how the results are used. We recommend double-checking anything critical.
Found an error? Let us know →