English
Make my PDF

How to Export Telegram Chat History (JSON vs HTML)

To export a Telegram chat, use Telegram Desktop on Windows, macOS or Linux. The phone apps don't have a chat export option. Open the conversation, click the ⋮ (or …) menu, choose Export chat history, pick the media you want, choose HTML (to read) or Machine-readable JSON (for tools), and click Export. Telegram saves a folder to your computer with the conversation and any media you selected.

Telegram announced this export tool in 2018 and it still works the same basic way. The rest of this guide covers each option, which format to choose, and what the export leaves out.

What you need

  • Telegram Desktop, installed from Telegram's official desktop apps page and signed in to the same account as your phone. Your chats sync because regular Telegram chats are stored in the Telegram cloud.
  • Enough disk space if you include photos and videos. Long group chats with media can be large.
  • A few minutes. Text-only exports are quick. Exports with lots of media take longer.

If you're on a Mac and don't see an export option, check which Telegram app you have. Telegram offers more than one Mac client, and the export steps here are for Telegram Desktop.

Export a single Telegram chat

  1. Open Telegram Desktop and sign in.
  2. Open the private chat, group or channel you want to export.
  3. Click the ⋮ (or …) menu in the top-right corner of the chat.
  4. Choose Export chat history.
  5. Choose what to include. Telegram lists media types such as photos, videos, voice messages and files, and lets you set a size limit for files. Untick anything you don't need.
  6. Choose the format: HTML or Machine-readable JSON.
  7. Optionally, set a date range if you only need part of the conversation.
  8. Choose where to save it and click Export.

When it finishes, Telegram can open the folder for you. Exact labels vary a little between versions, so if a button looks different, go by the closest match.

Export all your Telegram data at once

If you need many chats, or want an archive of your whole account, Telegram Desktop also has a full export. Telegram's announcement describes it as Settings → Export Telegram data. In newer versions it is inside Settings, usually under Advanced.

The full export lets you choose which kinds of chats to include (personal chats, groups, channels and so on), along with media and the format. It's more than most people need. For a single conversation, the per-chat export above is simpler.

HTML or JSON: which should you choose?

Telegram offers two formats, and the right one depends on what you'll do next.

HTMLMachine-readable JSON
Opens inAny web browserA text editor or a tool
Looks likeA styled copy of the chat, similar to the appStructured data
Main filemessages.html (split into more files for long chats)result.json
Best forReading, scrolling back, keeping a personal archiveConverting, searching, combining with other apps

Choose HTML if you just want to read the conversation later or keep a copy that looks like the app.

Choose JSON if you want to turn the chat into a PDF, combine it with chats from other apps, or process it with a tool. The JSON keeps every message's sender, date and text in a predictable structure, which converters rely on. Most converters, including the one on this site, read result.json.

You can run the export twice, once in each format, if you want both.

What's in the export folder

A typical single-chat export folder contains:

  • result.json or messages.html (plus messages2.html, messages3.html and so on for long chats).
  • Subfolders for media you chose to include, such as photos, video_files or voice_messages.
  • For HTML, small css, js and images folders that make the page look right.

In the JSON, each message records an ID, the date (including a Unix timestamp), the sender's name, the text, and, for media, the file path or a note that the file wasn't exported. Service events such as "pinned a message" or "joined the group" appear too.

What a Telegram export doesn't include

  • Secret chats. Telegram's FAQ says secret chats are device-specific and aren't part of the Telegram cloud. Telegram Desktop can't see a secret chat started on your phone, so it can't export it.
  • Deleted messages. Anything you or the other person deleted before the export is gone.
  • Self-destructed messages. If a timer removed them, they aren't in the export.
  • Media you unticked or files larger than the size limit you set. These appear in the text as placeholders.

If you need something from a secret chat, the only copy is on the device where it was created.

Reading and sharing the export

The HTML version is easy to read but awkward to share: it's a folder of files, not a single document, and it can break if someone opens just one file without the rest.

The JSON version is reliable data but not readable by most people.

If you need a single document, for example to print, attach to an application, or send to someone who doesn't use Telegram, convert the result.json to a PDF. Proof of Chat reads Telegram's JSON in your browser without uploading it and produces a page-numbered PDF with dates, times and sender names. The Telegram export guide has the short version next to the tool.

Talking to the same person on other apps too? See how to export a WhatsApp chat and how to download Instagram DMs.

Common problems

There's no Export option on my phone. That's expected: export is a Telegram Desktop feature. Install Desktop, sign in with the same phone number, and export from there.

"Export chat history" is missing on desktop. Update Telegram Desktop, and check you're in a chat window rather than the chat list. In some channels or groups, admins can restrict saving content, which may limit what you can export.

The export is huge or slow. Untick videos and files, lower the size limit, or set a date range. You can always export the media separately later.

Dates or times look off. The HTML shows times in your computer's local time zone. The JSON includes both a readable date and a Unix timestamp. If you compare with someone in another time zone, convert both to the same zone.

FAQ

Can I export a Telegram chat on iPhone or Android?

Not with the official mobile apps. Use Telegram Desktop on a computer signed in to the same account.

Will the other person be notified that I exported our chat?

Telegram's announcement of the export tool doesn't mention any notification to other chat members. As with any chat export, think about other people's privacy before sharing the file.

Can I export a group or channel?

Yes, the same Export chat history option works in groups and channels you can access, subject to any content restrictions set by admins.

Can I import a Telegram export into another app?

The export is meant for reading and archiving. Some apps offer their own import features, but treat a Telegram export as a copy for your records, not a backup you can restore.