basenc
Encode or decode data into base16, base32, base64, or base64url from files or stdin. Choose any base with --base and switch to decode with --decode.
Instructions
Encode or decode data in base16 (hex), base32, base64, or base64url from files or stdin. Read-only, no side effects. Returns JSON with encoded/decoded data by default; use --raw for raw bytes on stdout. Select format with --base (default base64), switch to decode mode with --decode. Use --max_output_bytes to bound output size. Use when you need flexible base selection via a single tool. Not for fixed-format needs — use 'base64' or 'base32' for dedicated encoding. See also 'base64', 'base32'.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "basenc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write raw encoded/decoded bytes to stdout. | |
| base | No | Base encoding. | base64 |
| paths | No | Files to read, or '-' for stdin. Defaults to stdin. | |
| decode | No | Decode instead of encode. | |
| encoding | No | Output encoding (default: utf-8). Use 'auto' for BOM/autodetection. | utf-8 |
| show_encoding | No | Include encoding detection metadata in JSON result. | |
| encoding_errors | No | How to handle encoding errors (default: replace). | replace |
| encoding_profile | No | Locale-aware encoding fallback profile for auto-detection. | |
| max_output_bytes | No | Maximum JSON bytes to emit. |