Subnet Mask Converter

Convert between CIDR notation (/24), decimal mask (255.255.255.0) and binary mask, in either direction.

How it works

Type the value in any of the three formats — /24, 24 (no slash) or 255.255.255.0 — and the tool automatically detects the format and shows the conversion to the other two, plus the wildcard mask (the bitwise complement of the mask, used in Cisco router ACLs) and the total number of addresses in the network.

Relationship between CIDR and decimal mask

The number after the slash in CIDR notation (e.g. /24) indicates how many bits, from left to right, are "1" in the 32-bit binary mask. /24 = 24 bits set to 1 followed by 8 bits set to 0 = 11111111.11111111.11111111.00000000 = 255.255.255.0.

Frequently asked questions

What is a wildcard mask?

It's the complement (bitwise inverse) of the subnet mask — mainly used in Cisco router access control lists (ACLs), where the "1" bits indicate which positions can vary.

Does any combination of numbers form a valid mask?

No — a valid subnet mask needs all its "1" bits grouped to the left, with no "0" in between (e.g. 255.255.254.0 is valid, but 255.255.1.0 is not). The tool warns you if the entered mask isn't valid.