IP range to CIDR
Find the smallest set of CIDR blocks that covers a range of IPv4 addresses.
Missing a feature or found a bug in IP range to CIDR? Tell me on X (@_andrewtran) or by email.
How to use IP range to CIDR
- Enter the first and last address with a hyphen between them.
- Read the CIDR blocks that cover the range exactly.
- Copy them into your firewall or allowlist.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
Why does one range need several blocks?
A CIDR block must start on a boundary and hold a power of two addresses. A range that does neither is covered by several blocks of different sizes.
Related tools
Viewport unit calculator
Convert vw, vh, vmin and vmax to pixels for any screen size, and pixels back to viewport units.8-point grid calculator
Snap any size to an 8-point spacing grid, or to a grid step of your own.Golden ratio calculator
Split a size by the golden ratio and build a type or spacing scale from it.ASCII table
All 128 ASCII characters with their decimal, hex, octal and binary codes, searchable.