🌐
Web & Developer100% Client-Side0 Bytes Uploaded

IPv4 Range → CIDR Blocks & Subnet Tester

Convert arbitrary IPv4 start-end address ranges into minimal canonical CIDR blocks and test target IPs for range membership.

🌐
IPv4 Range → CIDR Blocks & Subnet Tester
Convert arbitrary IPv4 start-end address ranges into minimal canonical CIDR blocks and test target IPs for range membership.
100% Client-Side
⚡Instant In-Browser Utility Ready

Zero server uploads • 100% private in-browser execution • Works offline

🌐IPv4 Range → CIDR Blocks & Subnet Tester Documentation & Guide

Web & Developer
Convert any arbitrary start-to-end IPv4 range (`192.168.1.10 - 192.168.1.50`) into the exact minimal set of canonical CIDR blocks for firewalls/ACLs, and optionally test whether a target IP sits inside the range.

📋How to Convert IP Ranges Into CIDRs

  1. Enter Start & End IPv4: Specify inclusive start IPv4, end IPv4, and optionally a single test IP to check.
  2. Compute Minimal CIDR Set: Click Compute CIDRs to run greedy largest-aligned power-of-2 block decomposition.
  3. Copy ACL Rules: Inspect total covered IP count, range match badge, and copy clean CIDR notation.
⚙️Unsigned 32-Bit Power-of-2 Prefix Alignment Decomposition▼

Converts IPv4 octets to unsigned 32-bit integers (`>>> 0`), repeatedly extracts the largest aligned `2^k` block divisible at the current cursor that still finishes on or before `endIp`, guaranteeing the mathematically minimal CIDR cover.

• Exact Boundary Safety: Zero over-allocation outside `[startIp, endIp]` bounds.
• Instant Membership Check: Verifies firewall allowlist membership in O(1) integer comparison.
📐Formula & Mathematical Architecture▼
CursorUint32 ≤ EndUint32 → Largest Aligned 2k Block → IP/(32 − k)
🧮Concrete Worked Examples▼
Partial Range DecompositionExample
Input: 192.168.1.10 to 192.168.1.50 (Test: 192.168.1.33)
Output: 5 minimal CIDRs (/31, /30, /28, /28, /30, /32 — exact 41 IPs) | Match: IN RANGE ✓

Power-of-2 alignment breaks non-subnet boundaries cleanly without leaking neighboring hosts.

Clean Power-of-2 Dual SubnetExample
Input: 10.0.0.0 to 10.0.1.255
Output: Single block: 10.0.0.0/23 (512 IPs)

When aligned on a 512-address boundary, the entire range collapses to one /23 CIDR.

⚠️Common Pitfalls & Edge Cases▼
  • ⚠️Rounding partial vendor IP ranges lazily up to `/24`, accidentally allowlisting 200 unrelated public hosts!
  • ⚠️Reversing Start IP and End IP order.
  • ⚠️Using signed 32-bit bitshifts in JavaScript without `>>> 0` on high IPs (`>= 128.0.0.0`).
💡Cloud Security Groups & Firewalls▼
  • Translating ISP/vendor dash-separated IP ranges (`10.20.0.10 - 10.20.0.50`) into AWS Security Group or Cloudflare WAF CIDR rules.
  • Auditing whether a client IP sits inside an approved IP allowlist window.
❓IPv4 Range → CIDR Blocks & Subnet Tester FAQ▼
Why does a partial range expand into 3–6 smaller CIDRs instead of 1?▼
CIDR blocks must strictly start on aligned powers of 2 (1, 2, 4, 8, 16, ...). Arbitrary ranges break cleanly into minimal aligned prefixes without exposing unrequested IPs.
Does the range include both Start IP and End IP?▼
Yes — both endpoints are inclusive.
100% Client-Side Privacy Guarantee:Internal network topology and IP allowlists stay strictly in local browser memory.
🎓Educational Hub • Master Runbook
⏱️ 16 min read

IPv4 Subnetting, CIDR Architecture & Linux Network Routing Runbook

The comprehensive engineering runbook for IPv4 networking: Master binary bitmask mathematics, calculate usable hosts with the 2^(32-n)-2 formula, design RFC 1918 VPC subnets, and debug Linux routing tables.

#Networking#IPv4#CIDR#Subnetting
Read Runbook→
👨‍💻
Built & Verified by ChrisMayPixels • Netherlands

Independent software developer focused on client-side web tools, local-first computing, WebAssembly, and privacy-first architecture. Every utility on MayOnlineTools runs 100% in-browser with zero telemetry.

About MayOnlineTools→
✨