ShowIP.net Public IP and request tools

Network tool

Range to CIDR

Convert a start and end IPv4 or IPv6 address into the smallest set of covering CIDR blocks.

Start address
8.8.8.0
End address
8.8.8.255
IP version
IPv4
Total addresses
256
CIDR blocks
1
8.8.8.0/24

Reference

Output fields

Start and end address
The inclusive range that must be covered by the returned CIDR blocks.
IP version
The start and end values must both be IPv4 or both be IPv6.
CIDR blocks
The smallest set of blocks that exactly covers the submitted range.
Block count
Several blocks may be needed when a range is not aligned to one larger CIDR boundary.

Advertisement

Overview

What this tool does

Range to CIDR converts a start and end IP address into the smallest set of CIDR blocks that covers that exact range.

It is useful when a vendor gives you raw IP ranges but your firewall, router, cloud rule, or API expects CIDR notation. For smaller network slices, use the subnet splitter.

Examples

Example ranges

Single CIDR block

8.8.8.0 - 8.8.8.255 Converts cleanly to one /24 block. Convert /24 range

Uneven range

8.8.8.1 - 8.8.8.3 Requires more than one CIDR block because the range does not start on a larger block boundary. Convert uneven range

Results

How to read results

The CIDR block list is an exact cover of the start and end address range. If several blocks are returned, use all of them together; dropping one block changes the covered range.

Boundaries

Limits

Start and end addresses must use the same IP version, and the start address must be lower than or equal to the end address. The result optimizes for the fewest CIDR blocks, not for provider ownership or routing policy.

Next steps

Advertisement