On a computer, open Telegram Desktop → open the chat → ⋮ → Export chat history → untick media → Format: Machine-readable JSON → Export. You get a result.json file.
Which Telegram apps can export?
Telegram added its export tool to Telegram Desktop in 2018. Telegram's own suggestion tracker still lists "Chat Export in mobile apps" as an open request, and its workaround is to use Telegram Desktop. So:
- iPhone and Android: no export. Use Telegram Desktop on a computer and sign in to the same account.
- Mac: there are two Telegram apps for Mac. Official docs only describe export in Telegram Desktop from desktop.telegram.org, not the separate "Telegram for macOS" app, so install Telegram Desktop if you don't see the option.
- Web versions: not covered by any official export docs we found.
Export one chat as JSON in Telegram Desktop
- Install Telegram Desktop and sign in.Download it from desktop.telegram.org (Windows, macOS or Linux). Telegram's phone apps don't have chat export.
- Open the chat or group.Click it in the chat list on the left.
- Click the ⋮ menu, then Export chat history.The menu is in the top-right corner of the chat.
- Untick the media you don't need.For text only, untick photos, videos, voice messages and files. The export is much faster without them.
- Set Format to Machine-readable JSON.Choose HTML instead if you just want to read the chat in a browser. JSON is what other tools (including ours) can read.
- Click Export.When it finishes, open the folder Telegram shows you. The JSON file is called
result.json. An HTML export opens frommessages.html.
Exporting everything instead of one chat
To export your whole account (all chats, contacts and more), Telegram's docs say to go to Settings → Advanced → Export Telegram data. For a single group, the per-chat export above is smaller and simpler.
Troubleshooting
I can't find "Export chat history"
You're probably in a phone app or the separate "Telegram for macOS" app. Install Telegram Desktop from desktop.telegram.org, sign in, and look in the chat's ⋮ menu. Update the app if it's old.
My export only has my own messages
That's expected for public groups and channels: Telegram's export docs say exports of those only contain the messages sent by the person exporting. Private groups and one-to-one chats include everyone's messages.
I got HTML files but need JSON
Run the export again and change Format to Machine-readable JSON. The JSON file is result.json.
Some photos or files are missing
Telegram's docs say media larger than your chosen size limit is replaced with a note instead of the file. Raise the size limit and export again if you need it.
Telegram asks me to wait before exporting
Some people see a security message asking them to come back later, usually on a newly signed-in computer. Telegram's docs that we checked don't describe this, so follow the time shown in the app. If you didn't start an export yourself, check Settings → Devices for sessions you don't recognize.
Privacy: what's in a Telegram export file
Telegram's published schema says result.json holds the chat's name, type and ID, then every message with:
- its date, the sender's name and their numeric Telegram user ID;
- the full text, including links, mentions and formatting;
- replies, edits, forwards (with who it was forwarded from) and service events such as people joining or pinned messages;
- if you included media, the file paths of photos, videos, voice messages and files saved next to it.
It's a plain file on your computer. It isn't protected by Telegram's encryption once exported, and it includes other people's messages, so share it carefully and delete it when you're done.
Turn your export into shareable cards, on your device
Group Chat Wrapped reads Telegram's result.json and makes cards for the top yapper, night owl, ghost and more. Free, and the chat never leaves your browser.
Sources
- Telegram Blog: Chat Export Tool, Better Notifications and More (Aug 27, 2018) (Telegram Desktop, JSON or HTML, Export chat history)
- Telegram: Data Export Schema (Settings > Advanced > Export Telegram data, result.json contents, public-group and media-size notes)
- Telegram Bugs and Suggestions: Chat Export in mobile apps (open request; workaround is Telegram Desktop)
- Telegram Desktop download