BYTETOOLS

Telegram MarkdownV2 Escaper

Escape the 18 characters Telegram MarkdownV2 reserves and fix the Bot API can't parse entities error, or switch the message to HTML parse mode.

0
Input characters
0
Output characters
0
Reserved found
0
Backslashes added

Ready for parse_mode=MarkdownV2

Escaped output appears here once you type a message above.

The 18 characters MarkdownV2 reserves

_*[]()~`>#+-=|{}.!

The backslash itself is escaped too, since Telegram uses it as the escape character. Inside a code span or pre block only ` and \ need escaping; inside the URL half of [text](url) only ) and \do. The “keep my formatting” mode applies those narrower rules so your entities still render. Everything runs locally in your browser — no bot token, no API call, nothing uploaded.

What is the Telegram MarkdownV2 Escaper?

Telegram's Bot API rejects a message with a can't parse entities error whenever a reserved character appears unescaped in MarkdownV2.

  • Escapes all 18 MarkdownV2 reserved characters, plus the backslash itself
  • Entity-aware mode keeps your bold, italic, spoiler, code and link markup working
  • Narrower rules applied inside code spans and inside the URL half of a link
  • HTML parse_mode conversion escaping only the ampersand and angle brackets
  • Reverse mode strips backslashes back out of already-escaped text
  • Runs entirely in your browser — no bot token and no API request

How to use the Telegram MarkdownV2 Escaper

  1. 1

    Paste the message text your bot will send into the input box.

  2. 2

    Choose a mode: escape everything, keep your entities, HTML parse mode or reverse.

  3. 3

    Review the reserved characters found in your text and the backslashes added.

  4. 4

    Copy the escaped output and pass it to sendMessage with the matching parse_mode.

About the Telegram MarkdownV2 Escaper

Telegram's Bot API rejects a message with a can't parse entities error whenever a reserved character appears unescaped in MarkdownV2. There are eighteen of them — underscore, asterisk, brackets, parentheses, tilde, backtick, greater-than, hash, plus, minus, equals, pipe, braces, dot and exclamation mark — and a single stray full stop in a version number is enough to break a send.

Paste your message and pick a mode. Escape everything is the safe default and backslashes every reserved character. Keep my formatting escapes the text around your bold, italic, spoiler, code and link entities while leaving those delimiters working. HTML parse mode escapes only the ampersand and the two angle brackets instead, and a reverse mode strips backslashes out again.

A panel lists which reserved characters your text actually contains and how many of each, so you can see exactly what the API was choking on. Everything is computed 100% locally in your browser — no bot token is needed, no API call is made, and nothing you paste is uploaded or logged anywhere.

Frequently asked questions

Why does Telegram say can't parse entities?

The Bot API returns that error when a MarkdownV2 message contains a reserved character that is neither escaped nor part of a valid entity. A full stop, hyphen or exclamation mark in ordinary prose is the usual cause, and backslashing every reserved character fixes it.

Which characters need escaping in Telegram MarkdownV2?

Eighteen of them: underscore, asterisk, square brackets, parentheses, tilde, backtick, greater-than, hash, plus, minus, equals, pipe, curly braces, dot and exclamation mark. The backslash itself must be doubled too, because Telegram uses it as the escape character.

Should I use MarkdownV2 or HTML parse_mode?

HTML is easier to generate safely, because only three characters ever need escaping: the ampersand and the two angle brackets. MarkdownV2 is more compact to write by hand. This tool produces both, so you can match whichever your bot code already uses.

Do I need to escape characters inside a code block?

Much less. Inside a code span or pre block Telegram only requires the backtick and the backslash to be escaped, and inside the URL half of a link only the closing parenthesis and the backslash. The keep-my-formatting mode applies those narrower rules automatically.

Is Telegram's legacy Markdown mode still supported?

The original Markdown mode still works but is deprecated in favour of MarkdownV2, which adds underline, spoilers and nested entities. Telegram can change parse-mode behaviour at any time, so check the current Bot API documentation before relying on the older mode.

Related tools