# Base Number Converter

> Base Number Converter is a paid API for AI agents from units-convert.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Converts a number between any two bases from 2 to 36 (binary, octal, decimal, hex, etc.) with big-integer precision

## Facts

- Endpoint: GET https://units-convert.x402tookit.com/base-convert?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-number-converter-29b16799
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9pcBQcjfdBqhWvXnBpMkW

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability base-number-converter-29b16799
```

Example prompt: Convert the decimal number 255 to hexadecimal — and also show me its binary and octal representations.

## When to prefer this

Use this endpoint when you need precise, big-integer-safe base conversion between any two bases from 2 to 36, especially when you also want the standard representations (binary, octal, decimal, hex) returned together in a single call. Prefer it over general-purpose calculators when you need programmatic access with structured JSON output.

## Known failure modes

- Invalid characters in the value string for the given from_base (e.g. '9' in binary input)
- from_base or to_base outside the 2–36 range
- Missing required 'value' query parameter
- Non-numeric or malformed input string causing a parse error
- Very large inputs may exceed processing limits

## How this service works

Convert a number between bases 2 to 36 exactly (binary, octal, decimal, hex), with big-integer precision.

## Output

Returns the converted number as a string in the target base, plus parallel representations in binary, octal, decimal, and hex, along with the bit length of the value and metadata about the conversion (input, fromBase, toBase, summary, and any disclaimer).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "value"
     ],
     "properties": {
      "value": {
       "type": "string",
       "description": "The number, digits only (optional 0x/0b prefix)"
      },
      "to_base": {
       "type": "integer",
       "description": "Base of the output, 2 to 36, default 16"
      },
      "from_base": {
       "type": "integer",
       "description": "Base of the input, 2 to 36, default 10"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "hex": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "input": {
       "type": [
        "null",
        "string"
       ]
      },
      "octal": {
       "type": [
        "null",
        "string"
       ]
      },
      "binary": {
       "type": [
        "null",
        "string"
       ]
      },
      "result": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "toBase": {
       "type": [
        "null",
        "number"
       ]
      },
      "decimal": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "fromBase": {
       "type": [
        "null",
        "number"
       ]
      },
      "bitLength": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-number-converter-29b16799/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from units-convert.x402tookit.com](https://www.zero.xyz/host/units-convert.x402tookit.com/llms.txt)
