Check IP in CIDR

Check whether an IP address belongs to a CIDR network prefix.

freeworks offlinenothing uploaded
ToolIP in CIDR Checker
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Address and network become fixed-width bits; applying the mask to the address and comparing the prefix determines membership. IPv4 and IPv6 use separate widths and parsers.

  • Mask comparison answers containment, not host usability.
  • Prefix length defines the boundary independently of allocation policy.

Worked example

Check if 192.168.1.50 is in 192.168.1.0/24
Verify an IP address belongs to a /24 subnet and see network details
Input
											Input1: 192.168.1.50
Input2: 192.168.1.0/24
										
Output
												IP: 192.168.1.50
CIDR: 192.168.1.0/24
Is in range: yes
Network address: 192.168.1.0
Broadcast address: 192.168.1.255
											

When to use this

Firewalls, routers, and cloud security rules check subnet membership.

Edge cases

  • Network or broadcast addresses can be inside IPv4 CIDR but unusable.
  • IPv4 prefixes outside 0–32 are invalid.
  • IPv6 cannot be compared with an IPv4 mask.

References