---
title: "Base64 encode / decode"
method: POST
path: "/v1/tools/base64"
---

# Base64 encode / decode

`POST /v1/tools/base64`

## Request

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

Encode text to Base64 or decode Base64 back to text (UTF-8 safe). Supports URL-safe alphabet. Use whenever you need to encode/decode data URIs, tokens, or config values instead of guessing the bytes.

## Request body

- object
  - `input` string, required: Text to encode, or Base64 to decode.
  - `mode` 'encode' | 'decode': Direction.
  - `url_safe` boolean: Use URL-safe alphabet (-_ instead of +/, no padding).

## 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)
