base64
Encode or decode data in standard base-64 representation for transfer and storage. Returns JSON or raw output.
Instructions
Encode or decode base64 data from files or stdin. Read-only, no side effects. Returns JSON with the result by default; use --raw for raw output on stdout. Use for standard base64 encoding in data transfer and storage. Not for flexible multi-base handling — use 'basenc' to switch between base16/32/64/64url. See also 'base32', 'basenc'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write raw encoded/decoded bytes to stdout. | |
| 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. |