md2tg — Markdown to Telegram Converter

Markdown to Telegram Converter

Convert standard Markdown to Telegram MarkdownV2 format instantly. Paste your Markdown, hit convert, and copy the result — ready to use with the Telegram Bot API.

Raw Markdown
Telegram MarkdownV2

Use via API

Integrate the markdown to Telegram converter directly into your application with a simple POST request. Send Markdown and receive properly escaped MarkdownV2 ready for the Telegram Bot API.

curl -X POST https://api.md2tg.projectstain.dev/ -d '{"markdown":"# hello world"}'

Use via n8n

Automate Telegram message formatting in your n8n workflows. The converter works as an HTTP Request node so you can process Markdown content before sending it to Telegram.

Why Use a Markdown to Telegram Converter?

Automatic Escaping

Telegram MarkdownV2 requires special characters like ., !, and - to be escaped with backslashes. This converter handles all escaping automatically so your messages render correctly.

Telegram Bot API Ready

The output is fully compatible with Telegram's sendMessage API using parse_mode: "MarkdownV2". Convert your content once and send it directly to any Telegram chat or channel.

API & Automation

Beyond the web interface, md2tg provides a free REST API and n8n integration. Automate your Telegram bot content pipeline with a single HTTP call.

Frequently Asked Questions

What is Telegram MarkdownV2?

MarkdownV2 is Telegram's formatting syntax for bot messages. It supports bold, italic, underline, strikethrough, spoilers, inline code, code blocks, and links — but requires special characters to be escaped with a backslash. This converter handles the escaping automatically.

How do I convert Markdown to Telegram format?

Paste your standard Markdown into the input field above and click "Convert." The tool instantly transforms it into Telegram-compatible MarkdownV2 with all necessary character escaping applied. Copy the result and use it with the Telegram Bot API.

Can I use the markdown to Telegram converter API for free?

Yes. The md2tg REST API is free to use. Send a POST request to https://api.md2tg.projectstain.dev/ with your Markdown content and receive the converted MarkdownV2 in the response. There are no API keys or sign-ups required.

Which Markdown features are supported?

The converter supports headings, bold, italic, strikethrough, inline code, code blocks with language syntax, links, and nested formatting. It uses the telegramify-markdown library under the hood for accurate conversion.