---
title: "Convert a number between bases"
method: POST
path: "/v1/tools/base_convert"
---

# Convert a number between bases

`POST /v1/tools/base_convert`

## Request

- Base URL: `https://mcp.cleanor.app`
- URL: `https://mcp.cleanor.app/v1/tools/base_convert`
- Auth: none declared

Convert an integer between number bases 2–36 (e.g. hex to binary, decimal to base-36). Arbitrary precision via BigInt, so large values stay exact. Use for radix conversions instead of doing them by hand.

## Request body

- object
  - `value` string, required: The number, in from_base (e.g. "ff", "1010", "255").
  - `from_base` integer: Base of the input (2–36).
  - `to_base` integer: Base to convert to (2–36).

## Response `200`

Tool result: `data` (structured) and `text` (human-readable).

- ToolResult
  - `ok` boolean
  - `tool` string
  - `data` object, nullable
  - `text` string
  - `attribution` string

## Other responses

- `400`: Invalid arguments.
- `429`: Rate limited (120 requests per minute per IP).

---

[API](https://skmtc.dev/cleanor/apis/cleanor-api.md) · [All operations](https://skmtc.dev/cleanor/apis/cleanor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cleanor/apis/cleanor-api/revisions/5f7be54e7a84?raw)
