// subnet calculator · IPv4 + IPv6 · terraform helpers
Classless Inter-Domain Routing, done right.
Paste a prefix and get everything: mask, wildcard, host range, binary, type. Then split it like Terraform would, turn a messy IP range into the fewest CIDRs, plan your VPC, and check that nothing overlaps. All local, nothing leaves the browser.
01
Inspect a prefix
IPv4 or IPv6 · e.g.10.42.0.0/20, 2001:db8::/48, or a bare address02
Terraform functions
uses the prefix from 01 asprefixcidrsubnet(prefix, newbits, netnum)
cidrsubnets(prefix, newbits…)
cidrhost(prefix, hostnum)
Negative hostnum counts from the end, like Terraform: -2 is the last usable host.
03
IP range → CIDR list
smallest set of prefixes that covers exactly the range04
Subnet planner
carve the prefix from 01 into equal blocks
or
05