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.
To build a Telegram inline keyboard, use the visual builder below.
tgkit lays out your buttons (URL, callback, switch-inline, login URL, Mini App) in rows and
copies the valid reply_markup JSON ready to paste into your Bot API call. No login,
runs in your browser. The resulting JSON drops straight into sendMessage or any
method that accepts reply_markup.
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.
Frequently asked questions
Is there an online Telegram inline keyboard builder?
reply_markup JSON ready to paste into your Bot API call. Free, runs in your browser, no login.What does the reply_markup JSON for an inline keyboard look like?
inline_keyboard array of rows, each row an array of buttons. Example: {"reply_markup": {"inline_keyboard": [[{"text": "Open", "url": "https://..."}, {"text": "Buy", "callback_data": "buy_1"}]]}}. Each button needs text plus exactly one of: url, callback_data, switch_inline_query, web_app, or login_url.What's the difference between inline_keyboard and reply_keyboard?
Why won't my Telegram bot show the inline keyboard?
callback_data exceeds 64 bytes, the bot has Privacy Mode on in a group (turn it off via @BotFather), or the message edit lost the markup (resend with reply_markup included). tgkit's builder always outputs valid JSON.