How to use Markdown in Telegram

Telegram supports Markdown-style formatting in two different places with two different rule sets: typing messages in the app, and sending messages through the Bot API. This guide covers both.

Formatting in the Telegram app

Regular chat messages support a small Markdown subset — type the markers and Telegram formats on send:

FormatType thisShortcut (desktop)
Bold**bold**Ctrl/Cmd + B
Italic__italic__Ctrl/Cmd + I
Monospace`code`Ctrl/Cmd + Shift + M
Strikethrough~~text~~Ctrl/Cmd + Shift + X
Spoiler||spoiler||Ctrl/Cmd + Shift + P

On mobile, select text and use the formatting menu instead. Note the app's markers differ from the Bot API's: double asterisks in the app, single asterisks in MarkdownV2.

Formatting through the Bot API

Bots opt into formatting with the parse_mode parameter. Three modes exist:

ModeStatusEscaping burden
MarkdownLegacy, frozenLow, but no underline/spoiler/quotes
MarkdownV2Current, full featuresHigh — 18 reserved characters, see the escaping reference
HTMLCurrent, full featuresLow — only < > &

Example: sendMessage with MarkdownV2

curl -s "https://api.telegram.org/bot<TOKEN>/sendMessage" \
  -d chat_id=123456789 \
  -d parse_mode=MarkdownV2 \
  --data-urlencode 'text=*Deploy finished\!* Version `1\.2\.3` is live\.'

Every dot and exclamation mark is escaped — miss one and the API returns 400: can't parse entities.

Example: Node.js

await fetch(`https://api.telegram.org/bot${TOKEN}/sendMessage`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    chat_id: chatId,
    parse_mode: "MarkdownV2",
    text: escapedText, // must be valid MarkdownV2
  }),
});

Which mode should you pick?

  • Hand-written bot messages: HTML — least escaping, hardest to break.
  • Forwarding existing Markdown (LLM output, READMEs, RSS content): MarkdownV2, converted automatically — use telegramify-markdown in code or the free md2tg converter from the browser, n8n, or any HTTP client.
  • Legacy Markdown: avoid for new bots — frozen feature set, subtle parsing quirks.

Related guides

Skip the manual escaping

Paste your Markdown into the free md2tg converter and get valid Telegram MarkdownV2 out — every reserved character escaped for you.