Inline keyboard builder
Build Telegram bot inline keyboards visually and copy the
reply_markup JSON to paste into your Bot API call. Supports
URL, callback, switch-inline, login URL, and Mini App buttons.
JSON output
How to send this from your bot
curl
curl -s "https://api.telegram.org/bot$TOKEN/sendMessage" \
-d chat_id=12345 \
-d text="Pick one" \
--data-urlencode 'reply_markup={}' Python (python-telegram-bot)
from telegram import InlineKeyboardMarkup
markup = InlineKeyboardMarkup.de_json({}, bot)
await bot.send_message(chat_id=12345, text="Pick one", reply_markup=markup) Button types — what they actually do
| URL | Opens a link in the user's browser. The most common type. |
| Callback | Sends a callback_query to your bot when tapped — handle it with answerCallbackQuery. Use for in-chat actions. |
| Switch inline | Switches the chat to inline-query mode with your text pre-filled. |
| Login URL | "Log in with Telegram" — sends your URL a signed payload identifying the user. Domain must be set in BotFather. |
| Mini App | Opens a Telegram Mini App (full HTML/JS app inside Telegram). URL must be HTTPS. |
| Copy text | Tapping copies the text to the user's clipboard. Newer button type. |
Tips
- Max 8 buttons per row, max 100 buttons per keyboard (Bot API limit).
- Keep button text short — 1-3 words. Long labels wrap unpredictably across clients.
- Callback data is limited to 64 bytes. Use short codes and store the real payload server-side.
- URL buttons don't carry referrer info. Use a
?start=…deep link for tracking — see the deep link builder.
Related tools
MarkdownV2 Escaper
Auto-escape every special char so parse_mode=MarkdownV2 stops rejecting your messages.
Find Chat ID
Step-by-step guide to retrieve the chat_id for a Telegram bot.
Test Bot Token
Paste a bot token and verify it instantly with getMe.
Error Code Reference
Every Telegram API error explained — FLOOD_WAIT, PEER_ID_INVALID, BUTTON_DATA_INVALID, and the actual fix.