Telegram export chat: save a chat as HTML or JSON

Published
Checked
Reading
5 min
Sources
6 named

In short

  • Chat export is built into Telegram Desktop for Windows, macOS and Linux; Telegram describes it for the desktop app only.
  • One chat: open it, click ⋮ and choose Export chat history. Everything: Settings > Advanced > Export Telegram data.
  • You choose the format (human-readable HTML, machine-readable JSON or both), the media types, a size limit and a date range.
  • Telegram may hold the download for some hours and notifies all your devices, so an export you didn't start is a warning sign.
  • Secret chats are device-specific and not part of the Telegram cloud, so a cloud export doesn't carry them.

To export a Telegram chat, open it in Telegram Desktop, click the ⋮ menu at the top and choose Export chat history. Pick a format (HTML to read in a browser, JSON for programs), tick the media you want, set a date range and click Export. To save your whole account at once, go to Settings > Advanced > Export Telegram data. Telegram describes the tool for the desktop app only.

Menu names below come from Telegram Desktop's official English strings, and the rules from telegram.org and core.telegram.org, all opened on 26 November 2026. We are not affiliated with Telegram.

Steps: How to export one chat. 1) Open Telegram Desktop and click the chat you want to save. 2) Click ⋮ in the top right corner. 3) Choose Export chat history. 4) In the Chat export settings window, tick the media types you want to keep. 5) Under Location and format, choose the folder and the format. 6) Set the period if you don't need all of it. 7) Click Export and wait for Data export completed.Steps: How to export one chat. 1) Open Telegram Desktop and click the chat you want to save. 2) Click ⋮ in the top right corner. 3) Choose Export chat history. 4) In the Chat export settings window, tick the media types you want to keep. 5) Under Location and format, choose the folder and the format. 6) Set the period if you don't need all of it. 7) Click Export and wait for Data export completed.

Where the export tool is

Telegram added the export tool on 27 August 2018, in Telegram Desktop. That app runs on Windows, macOS and Linux and is listed on telegram.org/apps next to the phone apps. The announcement describes the export in Telegram Desktop only, and we found no export option described for the iPhone or Android apps.

If you use Telegram only on your phone, that's not a dead end. Your cloud chats sync to every device you log in from, so install Telegram Desktop on any computer, sign in to the same account and export from there.

How to export one chat

  1. Open Telegram Desktop and click the chat you want to save.
  2. Click ⋮ in the top right corner.
  3. Choose Export chat history. In a channel the item is called Export channel history, and in a forum topic Export topic history.
  4. In the Chat export settings window, tick the media types you want to keep.
  5. Under Location and format, choose the folder and the format.
  6. Set the period if you don't need all of it. The range is shown as from "the oldest message" to "present" until you change it.
  7. Click Export and wait for Data export completed.

A long chat with lots of video can take a while. Telegram Desktop says you can close the export window, but asks you not to quit the app until the export is finished.

How to export all your Telegram data

The full export lives in Settings > Advanced > Export Telegram data. It opens a window called Export Your Data, where each checkbox is a category. Here is what each one saves, in Telegram's own words where it gives them:

Checkbox What it saves
Account information Your display name, username, phone number and profile photos
Contacts list The contacts synced with Telegram
Story archive All stories you posted from the Telegram mobile apps
Active sessions The connected devices shown in Privacy & Security > Active sessions
Personal chats, Bot chats Your one-to-one chats and your chats with bots
Private groups, Public groups Groups you're in, split by type
Private channels, Public channels Channels you follow, split by type
Only my messages Limits group and channel exports to messages you wrote
Music on Profile All tracks you saved to your profile playlist
Miscellaneous data Other data not covered above (marked beta)
Add this table to your site

Free to use on your site, blog or newsletter. Copy the code below and paste it into your page as HTML. It shows the same table with a link back to this page as the source.

Telegram's developer documentation adds two details. Supergroups and channels you have left are exported too, in a separate list. And if a chat's history can no longer be read, for example after you left a channel, the export falls back to just your own messages from it.

HTML or JSON: which format to pick

Telegram Desktop offers three choices: Human-readable HTML, Machine-readable JSON, or Both.

HTML turns the chat into a local web page. Open it in any browser, offline, and it looks roughly like a chat. Pick it if you want to reread old messages or keep an archive for yourself.

JSON is a structured text file for software. Pick it if you plan to search the chat with a script, load it into a spreadsheet tool or hand it to a program that analyzes chats. Before you upload a JSON export to any outside service, remember it contains every message you exported, from everyone in that chat.

Not sure? Choose Both. It only costs disk space.

Media and size limits

The media section lists Photos, Videos, Voice messages, Video messages, Stickers, GIFs and Files, each with its own checkbox, plus a Size limit slider. Telegram's documentation says files bigger than the limit you set are skipped. During the export Telegram Desktop also shows a Skip this file button if one file holds things up.

Untick what you don't need. A text-only export of a busy group is small and quick. The same group with every video can take hours and fill a drive. You can always run a second export later for media only.

Only one export runs at a time. If you start a new export, Telegram Desktop cancels the one already running.

Why the export may be delayed

Sometimes Telegram Desktop won't start the download right away. Its message reads: "For security reasons, you will be able to begin downloading your data in" a number of hours, and adds that Telegram has notified all your devices about the export request so you can react if you didn't make it. When the time is up, the app shows Data export ready and asks whether to start.

That notification on your phone matters. Somebody who got into your account would want exactly this file. If you see an export request you didn't start, go to Settings > Privacy & Security > Active Sessions on your phone, end any session you don't recognize, and turn on two-step verification. Our page on whether Telegram is safe covers the other settings worth changing.

What a Telegram export does not include

Secret chats. Telegram's FAQ says secret chats are device-specific, are not part of the Telegram cloud and can only be accessed on their device of origin, so an export of your cloud data doesn't carry them. If you need a secret chat's content, it stays on those devices.

Messages that are already deleted. The export copies what is in your cloud history today. A message you or the other person deleted for everyone is gone.

Unticked categories and media over the size limit, as described above.

What to do with the export

Store it like any private document. An export is a plain folder of files, not protected by Telegram, so keep it off shared computers and out of public cloud folders.

If you want to keep stories or gifts out of sight instead of archiving them, our guides to Telegram stories and hiding Telegram gifts explain the privacy options. For saving a big community before you leave it, our page on Telegram groups explains how groups and their admins work.

Moving the other way is a separate tool. Telegram's import, announced on 28 January 2021, brings chats in from WhatsApp, Line and KakaoTalk: you export the chat in that app and share the file to Telegram. Imported messages land in the current day but keep their original timestamps. If you're weighing the two apps, see Telegram vs WhatsApp.

Questions people ask

Can I export a Telegram chat on my phone?

Telegram describes the export tool only for Telegram Desktop. If you use Telegram only on a phone, install Telegram Desktop on a computer, log in to the same account, and your cloud chats will be there to export.

Does exporting a chat include photos and videos?

Only the types you tick. The export window lists photos, videos, voice messages, video messages, stickers, GIFs and files, plus a size limit. Files bigger than the limit you choose are skipped.

Why does Telegram make me wait before the export starts?

Telegram Desktop says the delay is for security: it notifies all your devices about the export request so you have time to react if you didn't ask for it. The app shows how many hours are left and offers to start once the data is ready.

Should I choose HTML or JSON?

HTML if you want to read the chat later in a browser, offline. JSON if a program or script will process it. Telegram Desktop also offers Both.

Can I export a group or a channel?

Yes. In Telegram Desktop the chat menu offers Export chat history for chats and groups and Export channel history for channels. Forum topics have their own Export topic history item.

Sources

  1. Chat Export Tool, Better Notifications and More, Telegram
  2. Telegram Desktop strings: export (official translation platform), Telegram
  3. Takeout API, Telegram
  4. Telegram FAQ, Telegram
  5. Telegram Applications, Telegram
  6. Moving Chat History from Other Apps, Telegram

How we write these pages