IP in range check
Paste your ranges and the addresses to test. Each address shows whether it's inside one of the ranges, and which ones. Works with IPv4 and IPv6.
Results
Example: paste your own ranges and addresses above.
| Address | Result | Matched |
|---|---|---|
| 192.0.2.15 | In | 192.0.2.0/24 |
| 198.51.100.200 | Out | — |
| 198.51.100.20 | In | 198.51.100.0/25 |
| 2001:db8:a::1 | In | 2001:db8:a::/48 |
| 2001:db8:b::1 | Out | — |
| 203.0.113.9 | Out | — |
- Address
- 192.0.2.15
- Result
- In
- Matched
- 192.0.2.0/24
- Address
- 198.51.100.200
- Result
- Out
- Matched
- —
- Address
- 198.51.100.20
- Result
- In
- Matched
- 198.51.100.0/25
- Address
- 2001:db8:a::1
- Result
- In
- Matched
- 2001:db8:a::/48
- Address
- 2001:db8:b::1
- Result
- Out
- Matched
- —
- Address
- 203.0.113.9
- Result
- Out
- Matched
- —
How it works
An address is in a range when it falls between the range's first and last address. For a CIDR block like 192.0.2.0/24, that's 192.0.2.0 to 192.0.2.255. An address can match several ranges when they overlap: 10.1.2.3 is in both 10.0.0.0/8 and 10.1.0.0/16.
Use it to check a log of client addresses against your allowlist, or to see which of your servers sit inside a network you're about to block. IPv4 and IPv6 are checked separately, except that an IPv4-mapped address (::ffff:192.0.2.1) also matches IPv4 ranges.
The ranges are sorted once and each address is found with a binary search, so lists of thousands of entries answer straight away. Everything runs in your browser.
To check whether your ranges overlap each other, use the CIDR overlap check. To pull addresses out of a log first, use the IP extractor.