Telegram Bot Guide
@base64hubbot encodes and decodes Base64 inside Telegram: in a private chat, with commands, with files and photos, and in inline mode in any chat.
Messages
Send the bot plain text in a private chat:
- If the text is valid Base64, at least 4 characters long after removing whitespace, and decodes to readable UTF-8 text, the bot replies with the decoded text.
- Otherwise it replies with the text encoded to Base64.
Replies come in monospace, so a tap copies them. Hello, hub! comes back as SGVsbG8sIGh1YiE=, and SGVsbG8sIGh1YiE= comes back as Hello, hub!.
A short word can happen to be valid Base64 that decodes to text. When you want a specific direction, use a command.
Commands
| Command | Reply |
|---|---|
/encode <text> | The text encoded to Base64. |
/decode <base64> | The decoded text. Bytes that are not text come as hex with a note. |
/url <text> | URL-safe Base64 without padding: /url Привет gives 0J_RgNC40LLQtdGC. |
/help | How to use the bot. |
/start | The welcome message. |
A command without text works on the message you reply to. The decoder accepts line breaks, a data: prefix, missing padding and URL-safe characters.
Files and photos
Send a file or a photo up to 1 MB. The bot replies with a .txt document that holds the Base64. For images (PNG, JPEG, GIF, WebP, SVG or any image/* file) the document holds a complete data: URI. Larger files get a short message saying they are too big; use File to Base64 or the CLI for those.
Any result longer than 4096 characters, Telegram’s limit for one message, is sent as a .txt document too.
Inline mode
In any chat, type @base64hubbot followed by a space and your text. Telegram offers:
- Encode
- Encode URL-safe
- Decode, when the text is valid Base64
Choosing one sends the result into the chat you are in.
Groups
In groups the bot answers commands only, such as /encode text or a /decode reply to someone’s message. It does not read ordinary group messages.
Languages and privacy
Replies follow the language of your Telegram app when it is English, German, Spanish, French, Portuguese, Russian, Japanese, Korean or Chinese, and English otherwise.
The bot runs as a Cloudflare Worker and stores nothing: each message is answered and forgotten. Messages still pass through Telegram’s servers, as with any bot, so keep passwords and private keys out of chats and use a local tool for them.
Updated Nov 22, 2026