TGStudio
Log in

Telegram text formatter

free · no sign-up

In the Telegram app you format text by selecting it: select words in the message field and you get bold, italic, underline, strikethrough, spoiler, monospace, link and quote. The tool below is for when you prepare formatting in advance or send it from a bot: it shows how the post will look and gives you the same text in HTML and MarkdownV2, escaped by the Bot API rules.

Markup: **bold**, __italic__, ++underline++, ~~strikethrough~~, ||spoiler||, `code`, [text](https://…), “> ” at the start of a line for a quote.

Characters without markup: 52 of 4096

Preview
This week: a surprise on Friday.
Details on the site

Tap a spoiler to reveal it

HTML for a bot (parse_mode: HTML)
<b>This week:</b> a <tg-spoiler>surprise</tg-spoiler> on Friday.
<blockquote>Details <a href="https://example.com">on the site</a></blockquote>
MarkdownV2 for a bot (parse_mode: MarkdownV2)
*This week:* a ||surprise|| on Friday\.
>Details [on the site](https://example.com)

How to use it

  1. step 1

    Write the text

    Select a word and press a toolbar button — the markup is added for you. Or type it: **bold**, __italic__, ||spoiler||, `code`, [text](https://…), “> ” at the start of a line for a quote.

  2. step 2

    Check the preview

    The preview shows how the text will look in Telegram. Spoilers open on tap, as in the app.

  3. step 3

    Copy for your bot

    HTML for parse_mode HTML, MarkdownV2 for parse_mode MarkdownV2. Special characters are already escaped, so a dot or a bracket will not break parsing.

How it’s calculated

In the app

Select text in the message field and Telegram offers bold, italic, underline, strikethrough, spoiler, monospace, link and quote. Long quotes can be collapsed.

HTML for bots

Tags <b>, <i>, <u>, <s>, <tg-spoiler>, <code>, <a href>, <blockquote>. The characters &, < and > in the text become &amp;, &lt; and &gt;.

MarkdownV2 for bots

*bold*, _italic_, __underline__, ~strikethrough~, ||spoiler||, `code`, [text](url), a line starting with > for a quote. The characters _ * [ ] ( ) ~ ` > # + - = | { } . ! in text are escaped with a backslash.

Italic next to underline

In MarkdownV2 three underscores in a row are ambiguous. The documentation suggests separating them with an empty bold **, and the tool does it for you.

Sources: Telegram FAQ · Telegram Bot API: Formatting options

Schedule formatted posts — 2 channels free →

two channels free, no card · cancel any time

FAQ

How do I make text bold in Telegram?

Select the word in the message field and choose Bold in the formatting menu. In a bot, use <b> in HTML mode or *asterisks* in MarkdownV2.

How do I hide text under a spoiler?

Select the text and choose Spoiler: readers see it after a tap. In a bot, use <tg-spoiler> in HTML or ||text|| in MarkdownV2.

How do I put a link on a word?

Select the word, choose Link and paste the URL. Telegram shows the full URL before opening such a link.

Why does my bot fail to send a message with a dot or a bracket?

In MarkdownV2 these are special characters and must be escaped. Copy the version from the tool — it is already escaped — or use HTML, where only &, < and > are escaped.

Where does my text go?

Nowhere: everything runs in your browser.

related guides

in TGStudio

other tools