CIDR to Subnet Mask Converter

Turn a /prefix into its netmask, wildcard and host range.

Runs locallyWorks offlineShare link carries settings, never your data
Send output toQR Code ReaderBarcode GeneratorSlug / URL EncoderBuild a workflow from thisOutput stays on this page until you send it.

Frequently asked questions

How does /24 relate to 255.255.255.0?

They are the same thing written two ways. The CIDR suffix counts the leading one-bits; 24 ones followed by 8 zeros, grouped into bytes, is 255.255.255.0. CIDR is simply the more compact notation.

Why does modern networking prefer CIDR?

Because the old class A/B/C system allocated addresses in fixed, wasteful blocks. CIDR allows any prefix length, so a network can be sized to what is actually needed — which is what extended the usable life of IPv4.

What is a wildcard mask?

The bitwise inverse of a subnet mask — 0.0.0.255 where the mask is 255.255.255.0. Cisco ACLs and some routing protocols expect it in that form, and mixing the two up is a common configuration error.

Pro tips

  • Plan subnets from the largest requirement down. Allocating small blocks first fragments the range and forces a renumber later.
  • Leave headroom — a /24 that is 90% full on day one is a migration waiting to happen, and renumbering a live network is far more expensive than reserving space.
  • Check the wildcard mask when writing access control lists; several vendors expect it rather than the subnet mask, and the two are inverses.
  • Use the split view to confirm that child subnets tile the parent exactly, with no overlap and no gap, before configuring anything.
  • Write allocations down in CIDR rather than as ranges. '10.0.4.0/22' is unambiguous where '10.0.4.0 to 10.0.7.255' invites an off-by-one.

About Subnet Calculator

Usable hosts always come to two below the total: the first address names the network and the last is the broadcast address, and neither can be assigned. That arithmetic is why a /30 yields only two usable addresses.

Convert a CIDR prefix like /24 into its subnet mask and wildcard mask, with the full network, broadcast and usable host range. It is computed locally in your browser.

A subnet calculator turns an IPv4 address and its CIDR prefix (or netmask) into everything you need to plan or troubleshoot a network: the network and broadcast addresses, the first and last usable host, the total and usable host counts, the wildcard mask and the address class. Enter something like 192.168.1.10/24 — or a netmask such as 255.255.255.0 — and every value updates instantly.

It also splits a block into equal subnets, which is the core of VLSM (variable-length subnet masking) design. Slide to a longer prefix to see how a /24 divides into /26s or /30s, complete with each child network's usable range and broadcast address.

Prefix length is the whole game, and the pattern is worth internalising: every bit added to the prefix halves the range. A /24 holds 254 usable addresses, a /25 holds 126, a /26 holds 62, and a /30 holds exactly two — which is why point-to-point links between routers are conventionally allocated a /30. Reading a prefix as 'how many halvings from a full octet' is faster than counting addresses.

Which range you allocate from is a decision worth making deliberately, because it is expensive to revisit. Three ranges are reserved for internal use — 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 — and home routers overwhelmingly default into the same corner of the last one. The consequence shows up the day two networks have to talk: a VPN between two sites that both chose 192.168.1.0/24 cannot route, because each end believes that range is local. Picking something unfashionable from 10.0.0.0/8 costs nothing now and avoids a renumber later.

Common use cases

  • Translating a prefix into the mask a device's config expects
  • Producing a wildcard mask for an access control list
  • Confirming a mask is valid before applying it to an interface
How it comparesCommand-line tools such as ipcalc and sipcalc give the same numbers and assume a terminal and a memorised flag set. Compared with other web calculators, the split view is the part that earns its place — seeing a /24 divide into its children is the step where hand arithmetic usually goes wrong.