Snipget.ai

CIDR / subnet calculator

Exact
networking_cidr

Deterministic and authoritative — the canonical answer for this input.

CIDR / subnet math. operation='info' (default) returns network/broadcast/netmask/hostmask, host count, and first/last host; 'subnets' splits at new_prefix; 'supernet' finds the containing block; 'hosts' enumerates usable hosts (capped). Processing multiple inputs? Use `networking_cidr_batch` to do up to 1000 in one call.

Parameters

valuestringrequired

A network in CIDR notation, e.g. 192.168.1.0/24.

operationstringoptional

info, subnets, supernet, or hosts.

new_prefixintegeroptional

Target prefix for subnets/supernet.

Call it

curl -X POST https://api.snipget.ai/v1/networking/cidr \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"value":"192.168.1.0/24","operation":"info"}'

The Batch tab sends up to 1000 inputs in one call via /v1/networking/cidr/batch.

Example response

{
  "input": "192.168.1.0/24",
  "is_valid": true,
  "operation": "info",
  "version": 4,
  "network_address": "192.168.1.0",
  "broadcast_address": "192.168.1.255",
  "netmask": "255.255.255.0",
  "hostmask": "0.0.0.255",
  "prefix_length": 24,
  "num_addresses": 256,
  "first_host": "192.168.1.1",
  "last_host": "192.168.1.254"
}

FAQ

Why not just work out the subnet myself?

Subnet math is easy to get subtly wrong, and language models are especially unreliable at it. This computes the network address, broadcast, netmask, host count, and usable range exactly, so the numbers are always right.

What can it do besides show network info?

Set the operation field to subnets to split a block into smaller ones, supernet to find the larger containing block, or hosts to list the usable addresses. The default, info, just describes the network.

How reliable are the results?

They are exact and deterministic. The same network always returns the same answer, computed straight from the address math, not estimated.

Does it cap large networks?

Yes. When you ask for subnets or hosts on a very large block, it returns the first 1024 and sets a truncated flag, so the response stays a reasonable size.

What if I paste an invalid network?

Something that is not a valid CIDR, like 192.168.1.0/40, comes back with is_valid false, a plain reason, and confidence 0, not an error.

Related tools