IPv4 address offset
ipv4-address-offset · version 1.0.0 · URLs & IP addresses · free, no key needed
Add a signed integer offset to an IPv4 address, throwing if the result leaves the IPv4 address space.
Use when you need to: ipv4 address offset · add offset to ipv4 address · ipv4 address increment.
Supported
- ipv4 address offset
- add offset to ipv4 address
- ipv4 address increment
Not supported
- IPv6
- CIDR-bounded wraparound
Behavior
- address is a canonical dotted-decimal IPv4 address; offset is a JSON integer (may be negative or zero).
- result is address's uint32 value plus offset, formatted as a dotted-decimal address.
- Throws if the result falls outside 0..4294967295 (0.0.0.0..255.255.255.255).
Input
address(string, required): max length 15; pattern^(?:0|[1-9][0-9]{0,2})(?:\.(?:0|[1-9][0-9]{0,2})){3}$offset(integer, required): min -4294967295; max 4294967295
Output
result(string, required): max length 15
Limits
- max address length: 15
- offset min: -4294967295
- offset max: 4294967295
Example
Request input:
{
"address": "192.168.1.1",
"offset": 10
}
Response:
{
"result": {
"result": "192.168.1.11"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ipv4-address-offset",
"version": "1.0.0",
"input": {
"address": "192.168.1.1",
"offset": 10
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ipv4-address-offset/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"address":"192.168.1.1","offset":10}'
The machine-readable contract is at /v1/tools/ipv4-address-offset/versions/1.0.0.
CLI
node cli.mjs run ipv4-address-offset 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- IPv6 address offset: Add a signed integer offset to an IPv6 address, throwing if the result leaves the IPv6 address space.
- IPv4 range to cidrs: Convert an arbitrary IPv4 address range into the minimal list of CIDR blocks that exactly covers it.
- IPv4 address classify: Classify an IPv4 address against the static IANA IPv4 special-purpose address registry.
- IPv4 address compare: Compare two canonical IPv4 addresses by their numeric uint32 value.
- IPv4 address distance: Compute the signed integer distance between two IPv4 addresses (address_b minus address_a).
- IPv4 CIDR parse: Parse an IPv4 CIDR block into its network, broadcast, netmask, wildcard mask, usable host range and address counts.