Telegram formatting and Markdown
Telegram has two answers depending on who is typing. A person gets a short list of inline formats and no structure at all — no headings, lists, tables or links. A bot gets MarkdownV2, which adds links and demands that eighteen characters be escaped in ordinary text.
The preview is standard Markdown — the second half is what Telegram ignores
Result
What a person can type
| Format | Telegram | Standard Markdown |
|---|---|---|
| Bold | **bold** | **bold** |
| Italic | __italic__ or _italic_ | *italic* |
| Underline | via the formatting menu | no syntax |
| Strikethrough | ~struck~ | ~~struck~~ |
| Spoiler | ||hidden|| | no syntax |
| Inline code | `code` | `code` |
| Code block | three backticks | three backticks |
| Heading | none | # Heading |
| List | none | - item |
| Link with text | via the formatting menu | [text](url) |
| Table | none | pipes and dashes |
One tilde, not two — the same difference Notion has. And selecting text then pressing Ctrl+K is how a link with text gets made, because there is no syntax for it.
Code blocks are the structure workaround
With no lists, tables or headings, a code block is the only place in a Telegram message where alignment survives:
```
Region Q1 Q2
North 1,240 1,610
South 980 1,020
``` Ugly, and the only thing that works. Build the columns in the table generator, take the CSV or the padded Markdown, and paste it inside backticks.
MarkdownV2, and the escaping that breaks bots
A bot sending a message picks a parse mode. MarkdownV2 adds
real links —
[text](https://example.com)
[mention](tg://user?id=123456789) — and requires that eighteen characters be escaped with a backslash anywhere they appear as literal text:
_ * [ ] ( ) ~ ` > # + - = | { } . !
A full stop counts. So does a hyphen. Which means the innocuous sentence
Done - 3 items. is rejected as malformed, and the failure
arrives as an API error rather than as a badly formatted message.
This is the single commonest cause of a Telegram bot failing to send, and it gets much worse with user-supplied content, where every value has to be escaped before interpolation.
Use HTML mode instead, in a bot
<b>bold</b> <i>italic</i> <code>code</code>
<a href="https://example.com">link</a>
<tg-spoiler>hidden</tg-spoiler>
Telegram's HTML parse mode supports the same formats and needs only three
characters escaped — &, < and
> — which every language already has a helper for. Unless
you are hand-writing a fixed message, HTML is the more robust choice by a
wide margin.
Common questions
- Does Telegram support Markdown?
- A small subset. Typing in the app gives you bold, italic, underline, strikethrough, spoiler, inline code and code blocks — and nothing else. There are no headings, no tables, no lists and no links with text unless you use the formatting menu.
- What is MarkdownV2?
- The parse mode bots use. It supports the same formats plus proper links, and it requires every reserved character in ordinary text to be escaped with a backslash. That escaping rule is the single commonest reason a bot message fails to send.
- Which characters have to be escaped in MarkdownV2?
- Eighteen of them: _ * [ ] ( ) ~ ` > # + - = | { } . and !. Any of these appearing as literal text needs a backslash in front. A full stop at the end of a sentence counts, which is why messages that look harmless get rejected.
- Can I make a table in Telegram?
- No. There is no table syntax and pipes render literally. A code block is the usual workaround — monospace keeps hand-aligned columns lined up, and it is the only place in Telegram where alignment survives.
- How do I make a list?
- By typing the characters yourself. Hyphens and numbers render as hyphens and numbers, with no indentation or automatic numbering, because Telegram has no list syntax. In practice a line per item with a leading bullet character is what people do.
- Should bots use MarkdownV2 or HTML?
- HTML, in most cases. Telegram's HTML parse mode supports the same formats and needs only three characters escaped rather than eighteen, so it is far harder to break with user-supplied content. MarkdownV2 is better only when you are hand-writing the message.