Telegram Text Formatter
Telegram's Bot API supports a rich MarkdownV2 syntax for bot messages and channel posts sent by bots. This formatter wraps your text with the right markers, escapes the reserved characters, and previews how the message renders in a Telegram chat. Bold, italic, underline, strikethrough, spoiler tag, inline code, and code blocks all supported.
How to format text for Telegram
1. Type or paste your message
Drop the message or channel post you want to format into the input box. Telegram messages can be up to 4096 characters; media captions up to 1024.
2. Pick a style button
Click Bold, Italic, Underline, Strikethrough, Spoiler, Code, or Block. The output box updates with the MarkdownV2 syntax wrapping your text. Click more than one style to combine them, and click a style again to remove it. Inline code and code blocks cannot be combined with other styles. The emoji buttons insert an emoji at the cursor, and the link fields add a link on its own line at the end of the message.
3. Preview before copying
The preview box mimics Telegram's rendering: bold appears bold, code in a green-tinted box, spoiler as a gray block (Telegram blurs it until tap). Turn on Channel post preview to see the message as a post under your channel name. Verify the formatting looks right before sending.
4. Copy and paste into Telegram
Click Copy and paste the output into your bot's sendMessage call, or into any tool that sends messages with parse_mode set to MarkdownV2. Telegram parses the MarkdownV2 syntax and renders the styling. To format a message you send yourself in a chat or channel, set Syntax to Telegram app first. That output uses **bold**, __italic__, ~~strike~~, ||spoiler|| and `code`, the markers the Telegram apps turn into formatting when you send. If a marker stays as plain text in your app version, select the text and use the app's formatting menu instead.
Telegram MarkdownV2 reference
Telegram supports the most features of any major social platform. Full syntax:
| Style | Syntax | Example |
|---|---|---|
| Bold | *text* | bold |
| Italic | _text_ | italic |
| Underline | __text__ | underline |
| Strikethrough | ~text~ | |
| Spoiler | ||text|| | tap to reveal |
| Inline code | `text` | monospace |
| Code block | ```code``` | multi-line code |
Telegram MarkdownV2 has a few stricter rules than other markdown dialects. Reserved characters such as !, ., (, ), -, =, +, {, } and # must be backslash-escaped when they are meant as plain text (the full list is below). The formatter adds these escapes for you.
Spoiler tags: when to use them
Spoiler tags are unique to Telegram. They blur the wrapped text in the chat bubble and require the reader to tap to reveal. Useful in a handful of contexts:
Plot reveals in book/movie/game discussion
A book club channel can post: The ending was ||completely unexpected|| and readers who have not finished the book can scroll past without spoilers.
Hidden answers in puzzle channels
Riddle or quiz channels post the question, then the answer wrapped in ||...||. Readers think first, tap to verify.
Mild content warnings
For posts that might catch a reader off-guard, the spoiler blur is a polite warning that creates a tap-to-confirm moment.
Spoilers are NOT a security feature. The wrapped text is still in the message body and visible via API, just blurred in the official client UI.
Bots, channels, and inline code
Telegram bot output benefits from formatting more than human chat does.
Bot status messages
Bold the operation result (Done, Failed, Pending), italic the timing (took 1.2s), code-format any returned IDs or URLs. Telegram bots that ship plain-text output feel a generation behind ones that use MarkdownV2.
Channel announcements
Channel post starts with a bold headline, an italic subtitle, and structured body. The format pattern is the same as a newsletter.
Inline code for shareable commands
Code-wrap any command, file path, or short identifier so users can tap-to-copy. Telegram clients copy the code text without the backticks when a user taps an inline code span. Very useful for tutorial channels.
Escaping special characters
Telegram MarkdownV2 requires a backslash before each of these characters whenever it is meant as plain text, including inside bold or italic text:
_ * [ ] ( ) ~ ` > # + - = | { } . !
Inside inline code and code blocks, only the backtick and the backslash need escaping. If you send via the Bot API with parse mode set to MarkdownV2 and a stray . or ! is not escaped, the message fails to send with a parse error.
Safe pattern for bots: the formatter on this page escapes every reserved character in your text before it adds the markers, so the output can go straight into a MarkdownV2 message. If your bot builds messages from a template, escape user-supplied strings the same way before you insert them.
Telegram vs WhatsApp vs LinkedIn vs X formatting
The four platforms take very different approaches.
Telegram (this tool)
MarkdownV2 with the richest feature set: bold, italic, underline, strike, spoiler, inline code, code blocks. Markers are hidden, styling is rendered. Best-in-class native formatting.
Smaller markdown subset: bold, italic, strike, monospace, plus lists and quotes on newer clients. WhatsApp formatter.
No native markdown. Bold and italic via Unicode mathematical letter substitutions. LinkedIn formatter.
X (Twitter)
Same Unicode trick as LinkedIn. No native markdown. X formatter.
Related tools
Frequently asked questions
Does Telegram render MarkdownV2 automatically?
Only when the message is sent through the Bot API with parse_mode set to MarkdownV2. The Telegram apps do not read these markers the same way when you paste them into a chat. For chats and channels, switch Syntax to Telegram app: it outputs **bold**, __italic__, ~~strike~~, ||spoiler|| and `code`. Keep MarkdownV2 for bots and tools that send with that parse mode.
What is a spoiler tag and when should I use it?
A spoiler tag wraps text in ||double pipes|| and tells Telegram to render it as a blurred block that the reader has to tap to reveal. Useful for plot reveals, hidden answers in puzzle channels, and mild content warnings. Not a security feature: the text is still readable via API.
Why is my message failing to send via bot?
If you are using parse_mode MarkdownV2 in the Bot API, every reserved character (_ * [ ] ( ) ~ ` > # + - = | { } . !) must be backslash-escaped wherever it is meant as plain text. An unescaped period or exclamation mark is a common cause of a 400 parse error. The output on this page is already escaped, so if you edit it by hand, keep the backslashes.
What does the Auto-escape toggle do?
With Auto-escape on (the default), the formatter puts a backslash before every MarkdownV2 reserved character in your text, so the message sends without a parse error. Turn it off when your text already contains your own MarkdownV2, such as a hand-written [link](https://example.com), and you do not want those characters escaped. The Telegram app syntax never adds escapes.
Can I combine bold and italic?
Yes. Click Bold, then Italic, and the formatter nests the markers as _*bold italic*_, which MarkdownV2 accepts. Click a style again to remove it. Inline code and code blocks cannot contain other styles, so choosing one of them replaces the others.
What is the maximum message length on Telegram?
4096 characters for regular messages. 1024 characters for media captions (photos, videos, files). Channel posts also follow the 4096 limit per post. The widget shows your message length as a percentage of the 4096 cap.
Do the formatting markers count against the character limit?
No. Telegram counts the 4096 limit after the markers are parsed, so *hello* uses 5 characters, not 7. The Characters count in the widget shows the raw output with markers and escapes, while the limit percentage uses the text without them.
Does the text leave my browser?
No. The formatter runs entirely in your browser using JavaScript. Your message and the formatted output are never sent to our servers and are not logged.
Will the formatting work in older Telegram versions?
Bots send the formatting as part of the message, and current Telegram apps render all of these styles. If a reader is on a very old app version, keep the app updated to see every style.
More wordcounter.ai tools
Other tools you might find useful.