How to back up your Telegram chats and files
How to export chats, photos and files from Telegram with Telegram Desktop and safely keep your account data and session files.
To back up your Telegram chats and files, use Telegram Desktop on a computer: go to Settings > Advanced > Export Telegram data, tick what you want to save (chats, photos, videos, files, contacts) and choose the format, HTML to read in a browser or JSON for use in programs. To save a single chat, open it, click the three-dot menu and choose Export chat history.
Backing up your chats is only half the job. On a purchased account, the session files from your order (.session, .json and the Telegram Desktop folder) also need to be kept, and kept somewhere safe: anyone who has those files can get into the account. This guide covers both sides.
Why back up if Telegram is in the cloud
Regular Telegram chats are stored in the cloud and show up on any device you log in to. Even so, a backup of your own is useful in several cases:
- Losing access: if the account is logged out everywhere and you cannot get back in, the cloud does not help. A backup on your computer is still yours.
- Deleted messages: anything someone deletes "for everyone" disappears from the cloud. What you exported earlier stays in your file.
- Records and proof: work conversations, agreements with customers, receipts and important files.
- Moving on from an account: saving its history before you stop using it.
Secret chats are different: they live only on the two devices that took part, never pass through the cloud and are not included in the export.
How to export all your data in Telegram Desktop
The full export exists only in Telegram Desktop (Windows, macOS and Linux). If you have not opened the account on your computer yet, see the guide on how to open the account in Telegram Desktop.
- Open Telegram Desktop and go to the menu (the three lines in the corner) > Settings.
- Open Advanced and scroll to the bottom.
- Click Export Telegram data.
- Tick what you want to save. The options include account information, contact list, private chats, bot chats, groups and channels, and media types: photos, videos, voice messages, round video messages, stickers, GIFs and files.
- Set the size limit for files. Files above the limit are skipped, which makes the backup smaller and faster.
- Choose the destination folder. By default Telegram saves to a "Telegram Desktop" folder inside Downloads.
- Choose the format: human-readable HTML or machine-readable JSON.
- Click Export and leave the program open until it finishes.
Security confirmation
For security, Telegram may ask you to confirm the export from another device where the account is open, and a session that was opened only recently may have to wait a while before it can export. If you see that notice, follow what the screen says and try again after the stated time.
HTML or JSON?
- HTML: creates pages you open in a browser, with chats laid out much like the app, photos and links to files. It is the best choice for reading, printing or showing someone.
- JSON: creates a structured data file, good for programs, spreadsheets and scripts. It is not comfortable to read.
If you are not sure, go with HTML. You can export again as JSON later if you need it.
How to export a single chat
When you only need one history, such as a conversation with a customer or a work group, there is no need to export everything.
- In Telegram Desktop, open the chat, group or channel.
- Click the three-dot menu in the top corner.
- Choose Export chat history.
- Pick the media types, the size limit, the date range (from one date to another, if you want), the folder and the format.
- Click Export.
There is no full export on phones, but you can save photos and files one by one, or forward what matters to your Saved Messages, which live in the account's cloud.
Keep the session files from your order
On an account bought from TG Stock, the order page delivers, besides the phone number, a ready session (Telethon StringSession), the authorization key with its DC and three downloads:
- the
.sessionfile, used by Telethon; - the
.jsonfile, with the phone number, DC and 2FA status; - the Telegram Desktop folder in a
.zip.
With a bulk purchase you get one .zip with the .session and .json of every account. All formats are listed on the delivery formats page (the store is in Portuguese), and the guide on StringSession and .session files explains what each one is for.
Why keep them
You do not have the number's SIM card. The login code only arrives inside Telegram, in the "Telegram" chat (777000), through an open session. If every session drops, the order files may be your way back in. So: download the files as soon as you receive them, keep a copy and never end the delivered session before you have another one working.
Why keep them carefully
These files are the key to the account itself. Anyone with the .session, the StringSession or the Telegram Desktop folder gets into the account without a code. 2FA protects against someone trying to log in with number and code, but not against someone who already holds a valid session. Treat these files the way you would treat a password:
- Store them somewhere only you control: a USB drive, an external disk or an encrypted folder. A
.zipor.7zarchive with a strong password already helps a lot. - If you use cloud storage (Google Drive, OneDrive and similar), turn on that service's own two-step verification and, ideally, upload the file already encrypted.
- Do not send the files by email or message, and do not put them in a shared folder.
- Do not leave loose copies on the desktop or in Downloads on a computer other people use.
- Do not use the same session in two places at once: Telegram may end the session and both places drop.
Your chat backup is sensitive too
The exported folder holds your chats, photos and contacts in plain form. It does not give access to the account, but it exposes everything in it. Store it the same way: somewhere safe and, if possible, encrypted.
Protect the account beyond the backup
A backup does not stop someone else from getting into the account. For that, do the basics right after you receive it: end the sessions that are not yours under Settings > Devices and turn on two-step verification under Settings > Privacy and Security. The store only guarantees and refunds the account if you do this right after delivery, and it does not hold anyone's 2FA password. The walkthrough is in how to secure your account.
Common questions
How long does the export take?
It depends on how many chats and how much media you have. Text alone takes minutes; with lots of videos it can take hours. Lowering the file size limit speeds it up.
Can I import the backup back into Telegram?
There is no way to import a full backup back into Telegram. The exported file is for reference and safekeeping.
Does the store keep my backup?
No. The chat backup is made on your computer and stays with you. The session files are available on your order page, but it is best to download them and keep your own copy.
Summary
In Telegram Desktop, Settings > Advanced > Export Telegram data saves everything as HTML or JSON; the three-dot menu in each chat exports just that history. Keep your order's session files somewhere safe, because anyone who has them can get into the account. Need another account? See the Telegram accounts by country (payment is by Pix in Brazilian reais).