IP in CIDR Checker

Check whether IP addresses fall inside CIDR ranges, one or many, with the bits compared.

IPv4 and IPv6; text after # is ignored. Results update as you type.

Result

10.0.5.9 is inside 10.0.0.0/16

The block runs from 10.0.0.0 to 10.0.255.255.

IP00001010.00000000.00000101.00001001
Network00001010.00000000.00000000.00000000

First 16 bits (the prefix) must match, and they do.

How to Check if an IP Is in a Subnet

An IP is inside a CIDR block, written in CIDR notation as address/prefix (10.0.0.0/16), when its first bits match the block's network: 10.0.5.9 is inside 10.0.0.0/16 because the first 16 bits match. Check one IP or a whole list against several ranges, IPv4 or IPv6.

Compare the first N bits (the prefix) of the IP and the network address; if they match, it's inside. For 10.0.5.9 and 10.0.0.0/16:

First 16 bitsRemaining 16 bits
10.0.5.900001010.0000000000000101.00001001
10.0.0.0/1600001010.00000000(any value)

The prefix bits are identical, so the address is inside; the block covers 10.0.0.0 to 10.0.255.255. With one IP and one range, the result shows this comparison for your input and points to the first bit that differs when the IP is outside.

Check Many IPs Against Many Ranges

Paste a list of IPs and a list of ranges to see which address falls in which block.

That's the allow-list audit: are these client IPs covered by the firewall rules? Which of these log entries come from the office network or a provider's published ranges? Each IP shows every range that contains it (ranges can overlap), each range shows how many IPs it matched, and "Copy IPs inside" copies the matching addresses. IPv4 and IPv6 can be mixed; an address only matches blocks of its own version.

To merge or shorten the range list itself, use the range to CIDR converter; for the details of one block, the subnet calculator.

How This Tool Works

ItemDetail
Where it runsIn your browser; nothing is sent to our server.
Input checksStrict: invalid addresses and blocks (such as 300.1.1.1 or a /33) are listed with the reason, never guessed. A bare IP in the ranges box is read as a single address (/32 or /128).
MethodThe first N bits of the IP are compared with the block's network address, where N is the prefix length.
LimitsUp to 2,000 lines in each box.
Shareable link?ip=10.0.5.9&cidr=10.0.0.0/16 opens the page with that check.
StoredNothing.
Last verified10 November 2026

Frequently Asked Questions

How do I check if an IP is in a subnet?
Enter the IP and the CIDR block, such as 10.0.0.0/16: the first 16 bits (the prefix) of both are compared, and if they match the IP is inside.
Is 10.0.5.9 inside 10.0.0.0/16?
Yes: the first 16 bits are 10.0 in both, and the block runs from 10.0.0.0 to 10.0.255.255.
Does the CIDR need an exact network address?
No: 10.0.5.0/16 is checked as 10.0.0.0/16, and the result says so. Only the bits inside the prefix count.

Next steps

Related Tools

Subnet Calculator
Network, broadcast, mask and host range of any IPv4 subnet.
IP Range to CIDR Converter
Turn any IP range into CIDR blocks, IPv4 and IPv6.
IP Extractor
Pull every IP address out of logs or any text.
IP Sorter
Sort and dedupe a list of IPv4 and IPv6 addresses.