Markdown to Telegram Converter

This Markdown to Telegram converter formats Markdown three ways: with the marks the Telegram apps turn into formatting, such as **bold** and __italic__, or as MarkdownV2 or HTML for bots, with every special character escaped. It counts the text against the 4,096-character message limit.

  • App, MarkdownV2 or HTML
  • 4,096-character check
Paste Markdown, or open a .md file. Front matter at the top is left out.

Options
Format for

How to convert Markdown to Telegram

Pick who the message is for.

  1. Paste your Markdown

    Paste the message, announcement or bot reply.

  2. Choose the format

    Telegram app for pasting into a chat or channel. Bot API MarkdownV2 or Bot API HTML for a bot, with parse_mode set to MarkdownV2 or HTML.

  3. Copy the message

    Click Copy message. In the app, the marks turn into formatting when you send.

Example

For a bot in MarkdownV2, this release note needs 3 escaped characters: the dot in 2.4, the full stop after “get it” and the closing exclamation mark. In the app format it shows 245 characters once the marks are gone.

Convert a sample release note

Telegram formatting: app vs Bot API

The same Markdown, written three ways.

MarkdownTelegram appMarkdownV2 (bots)HTML (bots)
**bold****bold***bold*<b>bold</b>
*italic*__italic___italic_<i>italic</i>
~~strike~~~~strike~~~strike~<s>strike</s>
Inline codeInline codeInline code<code>code</code>
Code fenced as pythonThree backticksThree backticks and python<pre><code class="language-python">
[text](https://…)text (https://…)[text](https://…)<a href="https://…">text</a>
# HeadingA bold lineA bold line<b>Heading</b>
- item• item• item• item
> quote│ quote>quote<blockquote>
A tableA code blockA code block<pre>

Escaping for MarkdownV2

MarkdownV2 is strict. In normal text, 19 characters need a backslash in front of them, or Telegram rejects the message: the underscore, asterisk, square and round brackets, tilde, backtick, >, #, +, -, =, |, curly braces, full stop, exclamation mark and the backslash itself. Inside code only the backtick and backslash are escaped, and inside a link’s address only ) and the backslash. The converter does all of this, so a full stop in v2.4 becomes v2\.4.

HTML is simpler: only <, > and & in your text need escaping, as &lt;, &gt; and &amp;. If you build bot messages by hand, HTML is the safer choice.

Telegram’s message limit

A Telegram message can hold 4,096 characters. Telegram counts the text after formatting is applied, so the marks and tags don’t count, and the counter under the result does the same. Longer text is split into several messages.

Markdown to Telegram Converter FAQ

Does Telegram support Markdown?

Partly. In the apps, **bold**, __italic__, ~~strikethrough~~, `code` and ||spoilers|| turn into formatting when you send. Bots use the Bot API’s MarkdownV2 or HTML.

How do I make text bold in Telegram?

Type two asterisks on each side, **like this**, or select the text and choose Bold from the formatting menu.

What is MarkdownV2?

The Bot API’s Markdown style for bot messages. It uses *bold*, _italic_, __underline__, ~strikethrough~ and ||spoiler||, and needs special characters escaped.

Why does my bot get “can’t parse entities”?

A character MarkdownV2 reserves, often a full stop, dash or bracket, isn’t escaped. Convert the text here, or switch the bot to HTML.

Should I use MarkdownV2 or HTML?

Both make the same formatting. HTML needs only <, > and & escaped, so it breaks less often when the text comes from users or an AI.

Sources and references

  1. Bot API: Formatting options, Telegram
  2. Increase character limit for messages, Telegram Bugs and Suggestions