Back to Blog

How Telegram Desktop Chat Export Works: HTML, JSON, Media and Restore Limitations

July 31, 2026·
How Telegram Desktop Chat Export Works: HTML, JSON, Media and Restore Limitations

1. What Telegram Desktop Export Is

Telegram Desktop includes a built-in export tool that saves chats, media and account information to local files, in either an HTML format meant for offline browsing or a JSON format meant for structured processing.1 It is reached from Settings, then Advanced, then "Export Telegram data" for a full account export, or from the menu inside an individual chat for a single conversation.1,2

The tool is part of Telegram Desktop specifically. Telegram's own bug tracker lists chat export in other apps, including mobile clients, as a distinct, separately tracked request, which indicates the feature as documented is a Telegram Desktop capability rather than one available uniformly across every Telegram client.8

2. Exporting All Telegram Data

A full account export starts from Settings, then Advanced, then "Export Telegram data." Telegram describes the outcome as making a user's data "accessible offline" in either format.1 The export dialog lets a user choose which categories of data and media to include, and set a maximum file size for downloaded media, so a full export can be narrowed to specific chats, contacts or media types rather than pulling every byte of every conversation.3

Telegram's export schema documentation describes the underlying structure this produces: a root export folder containing a result.json file plus a chats folder holding per-chat subfolders, each with its own media files referenced by relative path.3 This structure is described later in this article in more detail.

3. Exporting One Conversation

A single chat can be exported without exporting the entire account. From an open chat, the menu includes an "Export chat history" option that produces the same choice of HTML or JSON output, scoped to that one conversation.2 This is useful when a user wants a record of one group or one contact rather than a copy of their whole account, and it produces a smaller, self-contained version of the same folder structure used for a full export.

4. HTML versus JSON

Telegram's own description of the export tool frames the two formats around different purposes: a human-readable form as a local web page for browsing, and a machine-readable JSON form intended for further processing.1,2

HTML export JSON export
Primary purpose Reading chats in a browser Feeding chats into other software
Readable without extra tools Yes, any browser Not directly; needs a JSON-aware tool or script
Preserves message structure Yes, rendered as a chat view Yes, as nested objects and arrays
Suited to search, filtering or transformation Limited Well suited
Typical next step Open and browse Parse programmatically

Both formats can include the same underlying messages and media; the difference is how that content is packaged for the next step a user wants to take, not what data is available.

5. Messages, Media, and Account Information

An export can include message text, timestamps, sender information, and reply or forward metadata, plus separate media categories such as photos, videos, voice messages, video messages, stickers, GIFs and documents.3 Telegram's export dialog exposes a maximum-file-size setting for media, which lets a user exclude large video files while keeping smaller items such as photos and voice notes.1

Account-level information, such as profile details and a contact list, can also be included in a full export, separate from any individual chat's content.1 What is actually written to disk depends on the categories selected in the export dialog and on what the exporting account can see; an export cannot include content the account never had access to in the first place.

6. Export Folder and File Structure

The JSON export

Telegram's export schema documentation describes a result.json file at the root of the export folder, and a chats folder containing one subfolder per exported chat.3 Media referenced inside a chat is stored under that chat's subfolder and pointed to from the JSON using a relative path, for example a photo stored under a chat's own photos directory.3

The HTML export

The HTML export produces a browsable entry page (an HTML file for a full export, or a chat-specific HTML file such as messages.html for a single-chat export) alongside the same kind of per-chat media folders, so the export can be opened directly in a browser without any additional software.3

7. Export versus Backup

An export is a one-time snapshot written to local files at the moment it is generated. It does not stay synchronized with the account afterward, and generating a new export does not update the previous one; each run produces its own independent copy.1 This is a different model from Telegram's normal cloud-chat behavior, where signing in on a new device retrieves the account's cloud message history directly from Telegram's servers because that history already lives there, without any export or import step.9

Because of this distinction, "export" and "backup" describe two different relationships to the data. A backup, in the everyday sense of a copy an application can use later to restore state, implies a documented way back into the same system. Telegram's cloud-chat sync already provides that property for ordinary account access; the Desktop export tool provides an independent, portable copy for offline reading or processing, and the next section addresses whether that copy can also be used to restore state.

8. Can Telegram Exports Be Restored?

As of 31 July 2026, it is not possible to restore a Telegram Desktop HTML or JSON export back into a Telegram account. Telegram's documented import feature concerns histories originating from other messaging applications, not Telegram's own export output, and no alternative workflow for reimporting Telegram's own export exists in Telegram's product or API documentation.4,5

Telegram's API reference for imported messages describes a checkHistoryImportPeer step whose stated purpose is to check whether chat history exported from another chat app can be imported into a chosen Telegram conversation, a check scoped to foreign-app exports rather than Telegram's own format.5 Telegram's announcement of the underlying feature likewise describes bringing chat history "to Telegram from apps like WhatsApp" and other third-party messengers, not from Telegram Desktop's own export.4 No official Telegram page reviewed for this article describes a workflow, official or otherwise, for taking a Telegram-format result.json or export HTML file and re-importing it into a Telegram account.

This reflects Telegram's product as it exists today rather than a law of nature; Telegram has changed both its export and import tooling before, and could add a reimport path for its own export format in a future release.

9. Importing Histories From Other Messaging Applications

Telegram's documented import feature works in the other direction: bringing chat history that originated in a different app into Telegram. Starting in 2021, Telegram enabled users to bring chat history, including videos and documents, from apps such as WhatsApp, Line and KakaoTalk into Telegram, for both individual chats and groups.4 Imported messages keep their original timestamps but land in the receiving chat as of the day of the import, and other members of that Telegram chat can see the imported messages once the import completes.4

Mechanically, the source app produces its own native export or share action, which is then directed to Telegram rather than saved as a standalone file; Telegram's API layer then validates and ingests that source-app-specific format into a chosen chat.5 This is a different pipeline from the Desktop export tool covered in the rest of this article, both in direction (into Telegram, not out of it) and in the format it accepts (another app's export, not Telegram's own).

10. Secret Chats and Other Limitations

Telegram's Secret Chats use end-to-end encryption and are not part of Telegram's cloud storage; they exist only on the specific devices that took part in the conversation, rather than being retrievable from Telegram's servers.6 Telegram's own architecture documentation frames this as a direct consequence of the encryption model: because Secret Chat content is encrypted between the two participating devices rather than between a device and Telegram's servers, Telegram has no server-side copy to include in an export.6 This is a structural property of Secret Chats generally, and it applies to the export tool as much as to any other Telegram feature that depends on server-side storage.

A few further limitations follow from how the export tool and the underlying account work:

  • Unavailable media. Media that has been deleted, has expired, or is otherwise no longer retrievable from Telegram's servers at export time cannot be written into the export, regardless of whether it once appeared in the chat.
  • Public groups and channels. An export can only include what the exporting account is a member of and can see; it does not grant access to content outside that account's own view of a chat.
  • Account permissions and timing. Telegram's own export guidance notes that an account that has just signed in to Telegram Desktop may need to wait roughly 24 hours, or confirm the export request from another already-signed-in device, before an export can proceed.2 This is a security measure tied to newly authorized sessions rather than a property of the export format itself.
  • Software versions. The export tool is part of Telegram Desktop, and its available options have changed across versions since the feature's 2018 introduction.1 Instructions and screenshots tied to one version of Telegram Desktop may not match the dialog in a different version.

11. Comparison Table

Telegram Desktop export Import from another app Account backup or restoration (cloud sign-in)
Messages Yes, written to a local file Yes, brought into a chosen chat Yes, retrieved from Telegram's servers
Media Yes, saved into per-chat folders Limited, depends on the source app Yes, available again on request
HTML output Yes No No
JSON output Yes No No
Offline viewing Yes No No, requires an active, signed-in session
Structured processing Yes, via the JSON format No No
Import into a Telegram conversation Not possible for Telegram's own export Yes, for supported source apps Not applicable
Restores account state No No Yes, this is how a new device gets cloud chat history
Officially documented workflow Yes1,2,3 Yes4,5 Yes9

Limitations

This article describes Telegram Desktop's export tool as documented by Telegram and as corroborated across the official pages cited below, current as of the review date. It does not report results from independently testing the export tool, and screenshots or step-by-step menu labels have been deliberately avoided because they can drift between Telegram Desktop versions. The conclusion in Section 8, that restoring Telegram's own export into an account is not possible, reflects Telegram's product and documentation as they exist as of the review date; it should be re-checked against Telegram's current documentation before being relied on for a specific project, since Telegram updates both the export tool and its import API over time.

Last reviewed: 31 July 2026.

References

  1. Telegram, "Chat Export Tool, Better Notifications and More".
  2. Telegram, "Exporting Telegram data", Bugs and Suggestions.
  3. Telegram, "Telegram Data Export Schema".
  4. Telegram, "Moving Chat History from Other Apps".
  5. Telegram, "Imported Messages", API documentation.
  6. Telegram, "End-to-End Encryption, Secret Chats".
  7. Telegram Desktop, desktop.telegram.org.
  8. Telegram, "Chat Export in Other Apps Other Than Telegram Desktop", Bugs and Suggestions.
  9. Telegram, "FAQ for the Technically Inclined".

If the native export's HTML and JSON are the wrong shape for your work, a browser-based Telegram export writes the same conversations straight to CSV, JSON or JSONL without the desktop client in the loop.

Disclosure: Mastros develops browser-based data-export software. This article is intended as a general technical reference and was prepared using the independent sources cited above.