Subnet Mask to CIDR Converter - Free Online Tool

AdSense Placeholder
Slot: header_tool

Subnet Mask ⇄ CIDR Converter

Convert Between Dotted Mask and CIDR Notation

Enter either format — the direction is detected automatically.
The result will appear here

AdSense Placeholder
Slot: tool_mid_article

Understanding Subnet Masks and CIDR

Legacy Config Migration

Older network hardware often expects a dotted-decimal mask instead of modern CIDR notation.

Router Configuration

Quickly translate between formats when a router or firewall's config syntax doesn't match your documentation.

Learning Subnetting

See the direct relationship between a mask's binary pattern and its CIDR prefix length.

Client-Side Only

All calculation happens locally in your browser — no data is ever sent to a server.

Same Concept, Two Notations

A subnet mask and a CIDR prefix express identical information in different forms: the mask 255.255.255.0 has 24 leading 1-bits, exactly matching the CIDR prefix /24. Every valid subnet mask is a contiguous run of 1-bits followed by 0-bits — a mask like 255.255.0.255 (with 0s appearing before 1s) is invalid and this tool will flag it.

Key Takeaways

  • Auto-Detected Direction: Enter either a dotted mask or a CIDR prefix — no need to specify which.
  • Validates Contiguity: Rejects malformed masks that aren't a valid contiguous run of 1-bits.
  • Client-Side Only: All calculation happens locally in your browser — no data is ever sent to a server.
AdSense Placeholder
Slot: footer_leaderboard