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.
| CIDR | First address | Last address | Addresses | Mask |
|---|---|---|---|---|
| 203.0.113.0 | 203.0.113.255 | 256 | 255.255.255.0 | |
| 2001:db8:: | 2001:db8:0:ffff:ffff:ffff:ffff:ffff | 1,208,925,819,614,629,174,706,176 | ffff:ffff:ffff:: |
| CIDR | First address | Last address | Addresses |
|---|---|---|---|
| 203.0.113.5 | 203.0.113.5 | 1 | |
| 203.0.113.6 | 203.0.113.7 | 2 | |
| 203.0.113.8 | 203.0.113.15 | 8 | |
| 203.0.113.16 | 203.0.113.31 | 16 | |
| 203.0.113.32 | 203.0.113.63 | 32 | |
| 203.0.113.64 | 203.0.113.127 | 64 | |
| 203.0.113.128 | 203.0.113.191 | 64 | |
| 203.0.113.192 | 203.0.113.199 | 8 | |
| 203.0.113.200 | 203.0.113.200 | 1 |
- Dotted / standard form
- 203.0.113.42
- Decimal (integer)
- 3,405,803,818
- Hexadecimal
- 0xcb00712a
- Binary
- 11001011.00000000.01110001.00101010
- Octal
- 031300070452
- Dotted hexadecimal
- 0xCB.0x00.0x71.0x2A
- IPv4-mapped IPv6
- ::ffff:203.0.113.42
- IPv4-mapped IPv6 (hex groups)
- ::ffff:cb00:712a
- Reverse DNS (PTR) name
- 42.113.0.203.in-addr.arpa
- Address type
- Documentation (TEST-NET-3) · RFC 5737
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.