jamuny.editor

IP Subnet Calculator

Enter an address to see its network, range and masks.

Type an address with a prefix or a netmask and get the network, broadcast, first and last host, usable count, wildcard mask, PTR name and reverse zone, for IPv4 and for IPv6. Split a block into equal subnets or plan variable-length ones from host counts, check whether one network contains another, and merge a pasted list into the fewest blocks that cover it. The arithmetic is done on exact integers in your browser, so a /8 cut into /30s has 4,194,304 subnets. The page draws the first 1,024 rows, states the true count, and nothing leaves the page.

What "local-first" means

Most online text tools send whatever you paste to a server, run the work there, and send a result back. Your words sit in someone else's logs, backups and databases, and you have to trust a privacy policy.

Local-first means the opposite: the whole tool is downloaded to your browser and runs on your own device. Nothing you type is transmitted anywhere: not to us, not to anyone. There is no server that could receive it, which is a stronger guarantee than a promise not to look.

Three consequences worth knowing:

You do not have to take that on trust. Open your browser's developer tools, watch the network panel, and type: nothing appears in it.The network's verify page walks through the same check on every Jamuny tool.

How to use it

  1. Type a network on the Calculate tab. Write an address with a prefix, such as 10.20.30.40/22, or with a dotted mask, such as 10.20.30.40 255.255.252.0. IPv6 takes a prefix only.
  2. Read the block. The result lists the network, broadcast, first and last host, usable and total counts, both masks, the address in binary, its PTR name and the reverse zone that holds it. Copy puts one field on each line.
  3. Split, check or merge. Split cuts the block by subnet count, by a new prefix, or by host counts for IPv4. Check compares two networks. Merge takes a pasted list and returns the fewest blocks that cover it.

Worked example

An interface address is read as the block it sits in

Input
192.168.1.10/24
Output
Network 192.168.1.0
Broadcast 192.168.1.255
First host 192.168.1.1
Last host 192.168.1.254
Usable hosts 254
Netmask 255.255.255.0
Wildcard 0.0.0.255

Reading a CIDR result

A CIDR block is an address plus the number of leading bits that name the network. In 192.168.1.0/24 the first 24 bits are the network and the last 8 are free to number hosts, so the block holds 2^8 = 256 addresses. The netmask is the same fact written as a bit pattern: 24 ones followed by 8 zeros, which is 255.255.255.0 in dotted form. The wildcard mask is its inverse, 0.0.0.255, which is the form Cisco access lists and OSPF network statements expect.

Typing a host address with a prefix is normal, since that is how an interface is configured. 192.168.1.10/24 is not a network address because its host bits are not all zero. The calculator keeps what you typed, clears the host bits to find the block, and tells you it did so, rather than rejecting a line you copied from a router.

Octets with a leading zero are refused. Some parsers read 010 as octal, which is 8, and others read it as 10, so the same text names two different hosts. The error says which octet and what the plain decimal spelling would be.

Point-to-point links and the usable count

In an ordinary IPv4 block the lowest address names the network and the highest is the broadcast, so a /24 offers 254 usable hosts out of 256. The two exceptions are in RFC 3021. A /31 has two addresses and no room for either reservation, so both are hosts, which is how two routers are usually joined. A /32 is a single host, the form used for loopbacks and host routes. For both, the broadcast field is left empty instead of repeating an address that is really a host.

The range name next to a result comes from the IANA special-purpose registries: private space under RFC 1918, shared space under RFC 6598, loopback, link-local, documentation and so on. A block that is wider than one registry entry, such as 10.0.0.0/4, is reported as spanning several ranges, because any single name for it would be false.

Splitting a block and planning VLSM

Splitting by count cuts a block into equal parts, and since each cut adds whole bits the count is always a power of two. Ask for 5 subnets of a /24 and you get 8 /27 blocks, with a note that 8 is the next power of two above 5. Splitting by prefix names the size instead: a /22 split to /24 gives 4 blocks.

VLSM, variable-length subnet masking, starts from host counts. Each request takes the smallest power of two that holds the hosts plus the network and broadcast addresses, so 50 hosts need 64 addresses, a /26. Requests are placed largest first from the start of the block. Sorting by size is also what keeps every block aligned, because each one is no larger than the one before it. The table shows how many usable addresses each subnet wastes against what you asked for, and the plan is refused with the shortfall if the block runs out.

IPv6 prefixes and reverse names

IPv6 has no broadcast address, so every address in a block is usable and the result lists a first and a last address instead. Counts reach 2^64 for a single /64 and 2^128 for the whole space, which is why the page does its arithmetic on arbitrary-precision integers and prints the exact figure rather than a rounded one. A /64 is the standard size for a LAN, because stateless address autoconfiguration expects a 64-bit interface identifier.

Addresses are printed the way RFC 5952 recommends: lower-case hex, leading zeros dropped, and the longest run of two or more zero groups collapsed to a double colon. The expanded form is shown beside it for when you need to compare by eye. The PTR name for IPv6 is the address written one hex digit at a time, backwards, under ip6.arpa. The reverse zone is the same name cut off at the prefix: 2001:db8::/32 is the zone 8.b.d.0.1.0.0.2.ip6.arpa, and a prefix that is not a multiple of 4 bits covers a run of zones, which the result counts and bounds. IPv4 works the same way on octets, so 10.20.0.0/16 is 20.10.in-addr.arpa. A block longer than a /24 sits inside a single zone and is delegated by the classless method of RFC 2317.

Merging a list into fewer blocks

Paste networks one per line, or separated by spaces, tabs, commas or semicolons, with # starting a comment. Quotes and brackets around an entry are dropped, an address followed by a dotted mask counts as one entry, and a word that cannot be an address, such as a name copied from the next spreadsheet column, is ignored and listed. Merge sorts them, drops exact duplicates, drops any block that lies inside a larger one, and then joins aligned sibling pairs, repeating until nothing more joins. Four consecutive /24s starting on a /22 boundary become one /22. Two adjacent /24s that do not share a parent, such as 192.168.1.0/24 and 192.168.2.0/24, stay separate, because no single prefix covers exactly those two.

Duplicates and contained blocks are listed after the result so you can see what was dropped. An entry that looks like an address and fails stops the merge and is reported with its line number and its text, since a silently skipped entry would give a summary that is too small. A merge of more than 1,024 blocks draws the first 1,024 and says so; Copy still takes every block.

Questions

Why does a /24 show 254 usable hosts and not 256?

The first address is the network itself and the last is the broadcast, and neither can be given to a host. A /31 is the exception under RFC 3021: both addresses are hosts on a point-to-point link, and a /32 is a single host. IPv6 has no broadcast address, so every address in an IPv6 block counts.

What does the calculator do with an address that has host bits set?

It keeps what you typed, works out the block it belongs to, and says so. 192.168.1.10/24 is a valid way to write an interface address, so the result shows the network 192.168.1.0 and notes that host bits were set instead of rejecting the input.

Why does splitting stop at 1,024 rows?

A /8 split into /30 blocks has more than four million subnets, and a table that long freezes a browser tab without helping anyone read it. The page shows the first 1,024 and states the real total. The count itself is exact, and a longer split is better done by choosing a shorter new prefix.