IPv4 CIDR ↔︎ Netmask

Calculated Netmask: 255.255.255.0

Calculated Prefix: /24

About This Tool

The IPv4 CIDR to Netmask converter is a bidirectional tool that instantly converts between CIDR prefix notation (like /24) and traditional dotted-decimal subnet mask format (like 255.255.255.0). This tool is essential for network administrators who work with both modern CIDR-based systems and legacy equipment that requires traditional subnet masks. The conversion happens in real-time as you type, supporting seamless workflow integration.

How to Use

  1. Enter a CIDR prefix (0-32) in the CIDR Prefix field, OR enter a subnet mask in the Netmask field
  2. The tool automatically converts and displays both formats simultaneously
  3. Both fields sync with each other - changing one updates the other instantly
  4. Use the calculated values in your network configuration, documentation, or planning

Features

  • Bidirectional conversion - works both ways between CIDR and netmask
  • Real-time conversion as you type
  • Automatic synchronization between input fields
  • Support for all valid CIDR prefixes from /0 to /32
  • Validates input and shows only valid subnet masks
  • Clean, intuitive interface for quick conversions
  • No ads or distractions - focused on functionality

Common Use Cases

  • Converting CIDR notation for legacy routers and firewalls that require dotted-decimal format
  • Translating subnet masks from old configurations to modern CIDR notation
  • Verifying subnet mask configurations during network troubleshooting
  • Creating network documentation that includes both CIDR and traditional formats
  • Learning the relationship between CIDR prefixes and subnet masks
  • Quickly looking up equivalent notations during network design
  • Preparing configurations for mixed networking environments

Technical Details

CIDR (Classless Inter-Domain Routing) notation uses a suffix indicating the number of bits in the network portion of the address. For example, /24 means the first 24 bits are the network portion, leaving 8 bits for hosts.

The subnet mask is the dotted-decimal representation of the same concept. Each bit set to "1" in the mask represents the network portion:

  • /8 = 255.0.0.0 (Class A default)
  • /16 = 255.255.0.0 (Class B default)
  • /24 = 255.255.255.0 (Class C default)
  • /25 = 255.255.255.128 (splits Class C in half)
  • /26 = 255.255.255.192 (quarters a Class C network)
  • /27 = 255.255.255.224 (8 subnets per Class C)
  • /28 = 255.255.255.240 (16 subnets per Class C)
  • /29 = 255.255.255.248 (32 subnets per Class C)
  • /30 = 255.255.255.252 (point-to-point links)

This tool performs the conversion mathematically by converting the prefix length to a binary mask and then to dotted-decimal notation, or vice versa.