IPv6 parse
ipv6-parse · version 1.0.0 · URLs & IP addresses · free, no key needed
Parse an IPv6 address (any RFC 4291 textual form) into its 8 hextets and a 128-bit integer string.
Use when you need to: ipv6 parse · parse ipv6 address · ipv6 to hextets and integer.
Supported
- ipv6 parse
- parse ipv6 address
- ipv6 to hextets and integer
Not supported
- CIDR prefixes
- zone/scope IDs (e.g. %eth0)
- hostnames
Behavior
- address accepts any RFC 4291 textual form: 1-4 hex digits per group (either case, leading zeros within a group allowed), at most one "::" run-of-zeros compression, and an optional trailing embedded canonical dotted-decimal IPv4 suffix (e.g. "::ffff:192.168.1.1").
- hextets is the 8 JSON integers 0-65535 in left-to-right group order (embedded IPv4, if present, is split into its final two hextets).
- integer is the canonical decimal string of the 128-bit value hextets[0]*2^112 + ... + hextets[7], in 0..340282366920938463463374607431768211455.
- Output is independent of input case/compression/zero-padding style; ipv6-format inverts hextets or integer back to the RFC 5952 canonical string.
Input
address(string, required): max length 45
Output
hextets(array of integer, required): min items 8; max items 8; each min 0; each max 65535integer(string, required): max length 39; pattern^(0|[1-9][0-9]*)$
Limits
- max address length: 45
- integer max: 340282366920938463463374607431768211455
Example
Request input:
{
"address": "2001:db8::1"
}
Response:
{
"result": {
"hextets": [
8193,
3512,
0,
0,
0,
0,
0,
1
],
"integer": "42540766411282592856903984951653826561"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "ipv6-parse",
"version": "1.0.0",
"input": {
"address": "2001:db8::1"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/ipv6-parse/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"address":"2001:db8::1"}'
The machine-readable contract is at /v1/tools/ipv6-parse/versions/1.0.0.
CLI
node cli.mjs run ipv6-parse 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- IPv6 format: Format 8 hextets or a 128-bit integer string as the RFC 5952 canonical compressed IPv6 address.
- IPv4 parse: Parse a canonical dotted-decimal IPv4 address into octets and a uint32 integer string.
- IPv6 address offset: Add a signed integer offset to an IPv6 address, throwing if the result leaves the IPv6 address space.
- IPv6 CIDR parse: Parse an IPv6 CIDR block into its canonical network address, prefix, first/last address, and total address count.
- IPv6 range to cidrs: Convert an arbitrary IPv6 address range into the minimal list of CIDR blocks that exactly covers it.
- IPv4 address offset: Add a signed integer offset to an IPv4 address, throwing if the result leaves the IPv4 address space.