What is inside a Telegram export

Telegram's phone apps cannot export a chat. On a computer, Telegram Desktop can: open the chat, click ⋮ → Export chat history, tick the media you want and choose a format. You get a folder named ChatExport_ plus the date, containing:

  • result.json (if you chose machine-readable JSON) or messages.html, messages2.html and so on, a thousand messages per page;
  • voice_messages/ with one .ogg file per voice message, named like audio_12@14-03-2024_18-40-01.ogg;
  • round_video_messages/, photos/, video_files/ and files/ for the rest.

At the moment a voice message was sent, the chat file only points to its audio file. The words are in the .ogg, nowhere else. If you did not tick Voice messages in the export window, the file is not there at all and the export says it was not included.

Where a chatbot falls short

  • It sees file paths, not speech. Reading result.json, an assistant learns that a voice message exists. It does not hear it unless it can open and process every audio file in the folder.
  • Long chats do not fit. A year of messages runs to thousands of entries. A reply in a chat has a practical size limit, so the assistant summarises the middle, skips parts or stops.
  • Structure gets lost. Telegram records replies, forwards, edits and reactions. A summary flattens all of it; a record needs "reply to #12" and "forwarded from" next to the right message.
  • Languages. Telegram is used heavily in Russian, Ukrainian, Persian and Uzbek, often with mixed speech. Voice messages need to be written in the language spoken and often translated as well.

What works

  1. Export with voice messages ticked, in JSON if you can (it also records edits), and zip the folder.
  2. Process the export as it is built. Read the chat message by message, follow each reference to its file and send every voice message to a speech model on its own, so message 3,000 gets the same care as message 3.
  3. Keep the original first. Print any translation under the original message and under each transcript, not instead of it.
  4. Record where it came from. A SHA-256 fingerprint of the export file lets anyone confirm later which file the document was made from.

Our Telegram Chat to PDF tool does exactly this: upload the zipped export, check the first messages free with their voice messages written out, and get the whole chat as one PDF (plus text and spreadsheet files) for a one-time payment of $5.

If the PDF is for a lawyer or a court

A transcript made by software is a readable record, not certified evidence. Courts and agencies set their own rules for chat evidence and may require a certified translation. Keep the export folder unchanged, note its fingerprint, and ask your lawyer what they need.