b2KIT

Network Mask Converter

Convert between subnet mask formats: dotted decimal, CIDR notation, wildcard mask, and binary representation.

Tested tool guide Tested browser tools Checked August 16, 2026

What Network Mask Converter does, with a checked example

Network Mask Converter expresses one IPv4 subnet mask in four equivalent forms: dotted decimal octets, a CIDR prefix length, an inverse wildcard mask, and 32 binary bits. For a valid mask, the CIDR number equals the uninterrupted run of 1 bits from the left. The most common mistake is treating the wildcard as another spelling of the subnet mask. It is the bitwise complement, so every 1 becomes 0 and every 0 becomes 1.

Worked example

A concrete input and expected output from the current implementation.

Input

255.255.255.192

Expected output

Dotted decimal: 255.255.255.192
CIDR: /26
Wildcard mask: 0.0.0.63
Binary: 11111111.11111111.11111111.11000000

The binary mask contains 26 leading 1 bits, so its CIDR form is /26. Inverting every bit produces 00000000.00000000.00000000.00111111, which is 0.0.0.63 in dotted decimal.

How the result is produced

1

CIDR and binary

A CIDR prefix /n describes a 32-bit IPv4 mask containing n consecutive 1 bits followed by 32 minus n consecutive 0 bits. For /26, the first three octets contribute 24 ones and the final octet contributes two more. Grouping those bits into four octets gives 255.255.255.192.

2

Wildcard conversion

The wildcard form complements each subnet-mask bit. At the octet level, each wildcard octet is 255 minus the corresponding mask octet. Thus 255 becomes 0, while 192 becomes 63. Reversing the same operation converts a conventional wildcard mask back to its dotted subnet mask before determining the CIDR length.

Good uses

  • Translate a CIDR prefix from network documentation into the dotted mask requested by an IPv4 configuration form.
  • Convert a dotted subnet mask into the inverse wildcard notation used by some access-control and network-device configurations.
  • Inspect the exact 32-bit boundary of a mask when checking subnet calculations, configuration templates, or certification exercises.

Limits and checks

  • A CIDR-representable IPv4 mask must have one uninterrupted sequence of 1 bits followed only by 0 bits. A value such as 255.0.255.0 has no single CIDR equivalent.
  • A wildcard result indicates which mask bits were inverted. It does not identify a subnet, host range, gateway, or broadcast address without an accompanying IPv4 address.
  • Do not read the CIDR number as a host count. It counts fixed prefix bits out of 32; the remaining bits determine the address-space size.

Common questions

Why does 255.255.255.192 become /26 instead of /24?

The three 255 octets account for 24 leading 1 bits, but 192 is binary 11000000 and adds two more. That makes 26 prefix bits in total. A /24 would end after the third octet and would have dotted mask 255.255.255.0, not 255.255.255.192.

Can this conversion tell me which network an IPv4 address belongs to?

No. A mask alone describes the division between prefix and host bits, but it contains no address to which that division can be applied. To determine the network address, broadcast address, or contained range, combine the converted mask with a specific IPv4 address and perform a subnet calculation.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools