Export
- In Telegram Desktop open Settings → Advanced → Export Telegram Data;
- Choose what to export: account info, contacts, private chats, groups and media;
- Pick HTML for reading or JSON for machine processing;
- Set a media size limit and destination, then start.
Reading the result
HTML output opens in a browser with one folder per chat, messages and media together; JSON suits scripts for analysis or migration.
Caution
- Secret chats are never included;
- Export time depends on data size — plug in and keep free space handy.