{
    "slug": "base64-and-base-n-encoder-and-decoder",
    "name": "Base64 and Base-N Encoder and Decoder",
    "url": "https://directory.milunir.com/developer-tools/encoders-decoders/base64-and-base-n-encoder-and-decoder/",
    "description": "Encode or decode Base64, URL-safe Base64, Base32, Base58, Ascii85 and hex from UTF-8 text. foobar becomes Zm9vYmFy, matching the RFC 4648 test vectors.",
    "inputs": {
        "type": "object",
        "properties": {
            "text": {
                "type": "string",
                "description": "Input"
            },
            "direction": {
                "type": "string",
                "enum": [
                    "encode",
                    "decode"
                ],
                "description": "Direction",
                "default": "encode"
            },
            "format": {
                "type": "string",
                "enum": [
                    "base64",
                    "base64url",
                    "base32",
                    "base58",
                    "base85",
                    "hex"
                ],
                "description": "Format",
                "default": "base64"
            }
        },
        "additionalProperties": false,
        "required": [
            "text"
        ]
    },
    "outputs": [
        {
            "key": "primary",
            "label": "Result"
        },
        {
            "key": "bytes",
            "label": "Bytes"
        },
        {
            "key": "growth",
            "label": "Encoded size vs bytes"
        },
        {
            "key": "out_chars",
            "label": "Result characters"
        }
    ],
    "modes": null,
    "feed": null,
    "endpoint": "https://api.tools-directory.workers.dev/v1/tools/base64-and-base-n-encoder-and-decoder",
    "mcp_tool": "base64_and_base_n_encoder_and_decoder",
    "example": {
        "inputs": {
            "text": "foobar",
            "direction": "encode",
            "format": "base64"
        },
        "output": "Result: Zm9vYmFy\nBytes: 6\nEncoded size vs bytes: 133.3%"
    }
}