CIDR to IP range converter

Convert a CIDR prefix such as 203.0.113.0/24 into its first and last address and host count, turn a start–end range back into the minimal set of CIDR blocks, and convert any address between decimal, binary, hexadecimal and IPv4-mapped IPv6. All in your browser.

IPv4 and IPv6 can be mixed. Up to 200 lines; commas also separate entries.
CIDRFirst addressLast addressAddressesMask
203.0.113.0203.0.113.255256255.255.255.0
2001:db8::2001:db8:0:ffff:ffff:ffff:ffff:ffff1,208,925,819,614,629,174,706,176ffff:ffff:ffff::

CIDR to IP range

Enter a prefix (203.0.113.0/24, 2001:db8::/48) to see its first and last address, the subnet mask and wildcard, the total and usable host counts and the binary view. Several prefixes, one per line, are converted together — handy for firewall lists.

IP range to CIDR

Enter a start and end address (203.0.113.5 – 203.0.113.200) and get the smallest list of CIDR blocks that covers exactly that range. Arbitrary ranges rarely fit one prefix; the converter shows how many blocks are needed and why.

IP address converter

An IPv4 address is a 32-bit number; every notation is just a different way to write it.

Decimal

203.0.113.42 as a single integer is 3405803818 — the form some logs, databases and URLs use (http://3405803818/ works in most browsers).

Binary

11001011.00000000.01110001.00101010, the form that makes subnet masks obvious: the mask's 1-bits cover the network part.

Hex

0xCB00712A, common in packet dumps and some configuration files; each octet is two hex digits.

IPv4-mapped IPv6

::ffff:203.0.113.42 (or ::ffff:cb00:712a), the form an IPv6-only socket uses to represent an IPv4 client. Seeing it in logs means the server is dual-stack and the client connected over IPv4.

Frequently asked questions

How do I convert an IP address to CIDR format?

A single address is /32 (203.0.113.42/32). A range needs the prefix length whose block starts at the range's first address and covers it: use the range-to-CIDR converter above, which finds the minimal set of blocks for any range.

Can you explain CIDR for a beginner?

CIDR writes a block of addresses as the first address plus a slash and the number of leading bits that are fixed: 192.168.1.0/24 means every address whose first 24 bits match 192.168.1, that is 192.168.1.0–192.168.1.255. Smaller number after the slash = bigger block. See CIDR notation explained.

How do I know my CIDR notation?

Your network's prefix is your address with the host bits cleared plus your subnet mask's bit count: 192.168.1.20 with mask 255.255.255.0 is in 192.168.1.0/24. The subnet calculator computes it from any address and mask.

What is 255.255.255.255 in CIDR?

255.255.255.255/32 — a single address; the broadcast address of a local network is written this way in routing tables and firewall rules.

What does CIDR notation represent?

A block of consecutive addresses that share the same leading bits, written as first address/prefix length, replacing the old class-based sizes with any size that is a power of two.

Calculated in your browser: nothing is sent to a server. Address types follow the IANA special-purpose registries (RFC 6890 and successors); the maths is verified against Python's ipaddress module.

Last updated October 21, 2026