CIDR calculator (IPv4 & IPv6)
ClientEnter an IPv4 or IPv6 address with prefix length (for example 192.168.1.0/24 or 2001:db8::/32). Choose the IP version tab, then load an example or paste your own CIDR. All math runs in your browser.
CIDR input
?
IPv4: network and broadcast; usable hosts follow common /31–/32 rules shown below.
- Network
- 192.168.1.0/24
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Broadcast
- 192.168.1.255
- Host addresses
- Count: 256192.168.1.1 – 192.168.1.254
Common use cases
- Plan IPv4 subnets: see network, mask, wildcard, broadcast, and usable hosts for /24 and similar ranges.
- Validate IPv6 prefix boundaries: network address, last address in range, and address count (including very large subnets).
- Document firewall or routing rules with a shared CIDR string—copy results locally for runbooks.
Common mistakes to avoid
Expecting an IPv6 “broadcast” address
IPv6 does not use broadcast like IPv4. This tool shows the last address in the subnet range instead.
Mixing up /31 and /32 host rules on IPv4
Point-to-point links often use /31; single-host subnets use /32. Usable host counts follow the conventions shown in the IPv4 tab.
Forgetting that prefix length sets the whole boundary
The network address is the input address with host bits cleared. If your input is not aligned, the computed network may differ from what you typed.
FAQ
How do I switch between IPv4 and IPv6?
Use the IPv4 / IPv6 tabs. If you open the page with a query prefill, values that contain a colon (typical IPv6) select the IPv6 tab automatically.
Does this calculator send my addresses to a server?
No. Parsing and math run entirely in your browser tab.
Why is the IPv6 address count shown as a power of two?
For large subnets the exact integer is enormous; showing 2^n with host-bit count keeps the UI readable while staying accurate.
More tools
Related utilities you can open in another tab—mostly client-side.
Encoding tools
ClientBase64 and URL on this page; hub lists hex, HTML entities, JWT, JSON helpers, crypto, and tokens.
Hex encode & decode
ClientUTF-8 text to hex and hex to text—strip spaces, local only.
JWT decode
ClientInspect JWT header and payload as JSON in browser; signature not verified.
Random string generator
ClientRandom alphanumeric, hex, Base64 URL-safe, or custom tokens—entropy hint, local only.