IPv4 mask convert

ipv4-mask-convert · version 1.0.0 · URLs & IP addresses · free, no key needed

Convert between an IPv4 prefix length, dotted subnet netmask, and dotted wildcard (host) mask.

Use when you need to: ipv4 mask convert · prefix to netmask · netmask to prefix.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "prefix": 24
}

Response:

{
  "result": {
    "prefix": 24,
    "netmask": "255.255.255.0",
    "wildcard": "0.0.0.255"
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "ipv4-mask-convert",
  "version": "1.0.0",
  "input": {
    "prefix": 24
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/ipv4-mask-convert/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"prefix":24}'

The machine-readable contract is at /v1/tools/ipv4-mask-convert/versions/1.0.0.

CLI

node cli.mjs run ipv4-mask-convert 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.