DMCIT SERVICES
HomeServicesBlogContactLogin
DMCIT SERVICES

Expert consulting in Data, Mobile, and Cloud solutions to drive your digital transformation.

// Quick Links
  • Home
  • Services
  • Blog
  • Contact
  • Free Tools
// Services
  • Data Destruction
  • Mobile Device Management
  • Cloud Infrastructure
  • Digital Transformation
// Contact
[email protected]
07472 952393
Data Mobile Cloud
Unit A, 82 James Carter Road,
Mildenhall,
IP28 7DE

© 2026 Data Mobile Cloud. All rights reserved.

// FREE IT TOOLS

Subnet Mask Converter

Enter a subnet mask in any format — dotted decimal, CIDR, wildcard, or binary — and instantly see all equivalents.

  1. Home
  2. /
  3. Free IT Tools
  4. /
  5. Subnet Mask Converter
examples:

Enter a subnet mask in any format to see all equivalents

Common Subnet Masks

The table below shows the most frequently used subnet masks across all four formats. Use the converter above to look up any mask not listed here.

Common subnet masks in CIDR, dotted decimal, wildcard, and binary formats
CIDRDotted DecimalWildcardBinary
/8255.0.0.00.255.255.25511111111.00000000.00000000.00000000
/16255.255.0.00.0.255.25511111111.11111111.00000000.00000000
/24255.255.255.00.0.0.25511111111.11111111.11111111.00000000
/25255.255.255.1280.0.0.12711111111.11111111.11111111.10000000
/26255.255.255.1920.0.0.6311111111.11111111.11111111.11000000
/27255.255.255.2240.0.0.3111111111.11111111.11111111.11100000
/28255.255.255.2400.0.0.1511111111.11111111.11111111.11110000
/30255.255.255.2520.0.0.311111111.11111111.11111111.11111100
/32255.255.255.2550.0.0.011111111.11111111.11111111.11111111

Subnet Mask Formats Explained

A subnet mask can be written in four different but equivalent formats. Understanding each one is essential for configuring routers, firewalls, and access control lists.

Dotted Decimal

The most familiar format — four octets separated by dots, e.g. 255.255.255.0. Each octet is a decimal number from 0 to 255 representing 8 bits. Network bits are set to 1 and host bits are set to 0.

CIDR Prefix Length

A compact notation that counts the number of leading 1-bits in the mask, written after a slash — e.g. /24 means the first 24 bits are network bits. This is the format used in routing tables and cloud platform networking consoles.

Wildcard (Inverse) Mask

The bitwise inverse of the subnet mask — 0s where the subnet mask has 1s and vice versa. For 255.255.255.0 the wildcard is 0.0.0.255. Wildcard masks are used in Cisco ACLs, OSPF area definitions, and NAT configuration.

Binary

The raw 32-bit representation with dots between each octet, e.g. 11111111.11111111.11111111.00000000. Binary is the most explicit format and is useful for understanding how subnetting actually works — each 1 marks a network bit and each 0 marks a host bit.

Valid subnet masks must be contiguous — all 1-bits appear on the left and all 0-bits on the right, with no gaps. A mask like 255.0.255.0 is invalid because the 1s are not contiguous. Non-contiguous masks are rejected by most routers and operating systems.

Frequently Asked Questions

How do I convert a CIDR prefix to a dotted decimal subnet mask?
The CIDR prefix tells you how many leading bits are 1s. Set that many bits to 1 from the left, fill the rest with 0s, then convert each 8-bit octet to decimal. For example, /26 has 26 ones followed by 6 zeros: 11111111.11111111.11111111.11000000, which is 255.255.255.192.
What is the difference between a wildcard mask and a subnet mask?
They are bitwise inverses of each other. Where a subnet mask has 1s for network bits and 0s for host bits, the wildcard mask flips that — 0s for network bits and 1s for host bits. For a /24 subnet the mask is 255.255.255.0 and the wildcard is 0.0.0.255. Subnet masks are used by IP stacks to determine on-link vs off-link traffic; wildcard masks are used by Cisco ACLs and routing protocols to match address ranges.
What is a contiguous subnet mask?
A contiguous subnet mask has all its 1-bits on the left and all its 0-bits on the right, with no interleaving. For example, 255.255.255.240 (11111111.11111111.11111111.11110000) is contiguous, but 255.255.0.255 (11111111.11111111.00000000.11111111) is not because there is a gap of zeros between ones. Most network equipment and operating systems only accept contiguous masks.
How do I convert a dotted decimal mask to CIDR notation?
Count the number of 1-bits in the binary representation of the mask. For 255.255.255.192, the binary is 11111111.11111111.11111111.11000000 — 26 ones — so the CIDR prefix is /26. A quicker method: add up the bit values of each octet. 255 = 8 bits, 192 = 2 bits, so 8+8+8+2 = /26.
When should I use a wildcard mask instead of a subnet mask?
Use a wildcard mask when configuring Cisco devices — specifically in access control lists (ACLs), OSPF network statements, and NAT pool definitions. Standard IP interfaces and DHCP scopes use subnet masks. If you are configuring a Cisco ACL and write "255.255.255.0" as the mask, the router will treat it as a wildcard and match everything — the inverse of what you intend. Always use the wildcard (0.0.0.255 for a /24) in ACLs.
// NETWORK DESIGN

Need help with network design?

DMC IT Services designs and manages cloud and on-premises network infrastructure for SMBs across London, Cambridge, Hertfordshire, and Bedfordshire — from IP addressing and VLAN planning through to Microsoft 365 and Azure deployments.

Talk to an Engineer
← Back to all free tools