How to Export Telegram Chat History Without Losing Media
Most people find out how Telegram's export tool works on the day they need it most, which is the worst possible day to learn anything. A group is about to be handed over, an account is about to be closed, a client wants a record of what was agreed, and somebody opens Settings for the first time in years hoping the answer is one button. It nearly is. The export itself is straightforward. What is not straightforward is that the default settings quietly leave most of your media behind, and you usually discover that after the chats are gone.
This article walks through what Telegram actually holds on your behalf, where the export tool lives and why it only lives there, the one number that decides whether your photos and videos come with your messages, the specific failures that drop media even when the size is fine, how large archives are paginated, what an export contains beyond messages, and how the separate question of what new members can see is not the same setting at all. Every platform detail below was pulled from Telegram's own documentation on 8 August 2026 rather than remembered, and the wording of each refusal is quoted as the platform states it.
What Telegram Is Actually Holding for You
The chat list is a window, not the archive
Telegram stores your messages on its side rather than on your phone, which is why a new device shows years of history the moment you sign in. That has an obvious upside and a less obvious one. The upside is that nothing depends on a device backup. The less obvious one is that the app you are looking at is a viewer over a much larger store, and scrolling is a poor way to reach the far end of it. Telegram made exactly this point when the export tool was announced, describing it as particularly useful for users who have millions of messages and cannot easily access the oldest parts of their messaging history.
That framing is worth taking literally. If your reason for exporting is that you cannot find something, the export is not a backup task, it is a search task, and the format you choose at the end of this process decides whether the search is possible at all.
Secret chats are not in there
Secret chats sit outside all of this by design. Telegram's own description is blunt about the consequence, noting that a secret chat lives on the device it was started on and that logging out loses every secret chat you have. Nothing that is device only can appear in a cloud export, so if a conversation you need is in a secret chat, the export tool is not the tool. That is a design decision rather than a gap, and it is the same decision that makes secret chats worth using in the first place.
Protected content is the second exception
The other thing an archive will not rescue is content somebody deliberately locked. Telegram lets a sender protect the contents of a message from forwarding and saving, and lets a whole chat be marked so that its messages cannot be forwarded to other chats. Both states are visible to software through the bot interface, the per message option and the per chat flag, and both mean the same thing in practice. If a chat you rely on is protected, plan for the possibility that the material lives only where the owner allows it, and read our note on saving restricted content before assuming an export will cover you.
Where the Export Tool Lives, and Why Only There
Desktop, not the phone in your pocket
The full export runs from Telegram Desktop. The instruction Telegram gave when the feature launched has not changed in shape since, make sure you have the latest version of Telegram Desktop installed on your computer, then open Settings and choose Export Telegram data. Telegram Lite, the three column client aimed at work and large communities, can also be used to export your data and chats.
People are often annoyed by this, and the annoyance is misplaced. An export of a busy account is thousands of network requests and potentially many gigabytes of files written to disk in a specific folder layout. A phone is a poor host for that job, and the desktop clients are the ones with a reference implementation behind them. Telegram names its own desktop client as the example implementation for the export procedure, which tells you where the behaviour is defined.
It is worth separating this from the other desktop folder people ask about. An export is a readable archive you create deliberately, while the working data a desktop client keeps in order to stay signed in is a different thing entirely with different risks, and we set the two side by side in session files compared with TDATA. Confusing them is how people end up copying the wrong folder and wondering why it contains no messages they can read.
One conversation at a time
You do not have to take everything. Opening the three dot menu inside any chat gives you Export chat history, which is the same machinery pointed at a single conversation. This is the right choice far more often than people assume. A single chat export finishes in a fraction of the time, produces a folder you can actually read, and avoids the situation where an eight hour job fails at hour seven and you are not sure what you have.
Choose the scope before you touch the settings
The single most useful habit here is deciding what the archive is for before opening the dialog. An archive that exists to answer questions later is a different job from an archive that exists because an account is closing. The first wants search, structure and small size. The second wants completeness at any size. Those two goals pull the settings in opposite directions, and most bad exports are the result of trying to satisfy both at once.
JSON or HTML, and Why the Choice Is Not Cosmetic
One is for reading and one is for working
Telegram offers the result in JSON format or in formatted HTML, and describes the point of the exercise as having all your data accessible offline. The HTML output is the one that looks like a chat. You open it in a browser, you scroll, media is embedded where it exists, and anybody can use it without being shown how. If the archive is going to a colleague, a client or a folder that somebody may open in three years, HTML is the answer.
JSON is what you pick when you have a question
JSON is a machine readable record. Nobody enjoys reading it, and that is not what it is for. It is what you choose when the archive has to be counted, filtered, searched across many chats at once, or fed into anything else. If you already know you will be asking how many messages came from one person, or when a conversation started going quiet, or which links were shared over a year, the answer costs minutes with JSON and hours with HTML.
If you cannot tell yet which one you need, run the export twice. The second run is cheaper than a wrong guess, and the two formats are produced from the same source rather than converted from one another.
The Setting That Quietly Loses Your Media
There is a size limit, and it applies to each file
This is the part that catches people. Telegram's export does not simply take media or leave it. It takes media up to a size you set, and the export session records that ceiling as a maximum size in bytes of files to download. The documentation is explicit that this value is always populated whenever downloading media is enabled at all, which means there is always a number in effect even when you did not consciously choose one.
The critical detail is that the number is per file rather than per export. A ceiling that sounds generous against a whole archive is not generous at all against a single video. Set it against the largest item you care about, not against the total you are willing to store.
Anything above the ceiling is simply not fetched
A file over the limit is not truncated, compressed or replaced with a smaller version. It is not downloaded. The message that carried it still appears in your archive, with its date, its sender and its text, and the attachment is not there. This is why an export can look complete and still be missing exactly the things you exported it for, which tend to be the large ones, the recordings, the long videos, the design files and the archives somebody sent you two years ago.
Custom emoji are media too
Here is a detail almost nobody accounts for. The export procedure states that for every saved message the client also downloads and saves all attached media, including custom emojis present in messages and captions, and that this happens while respecting the per file download size limits set by the user. Custom emoji are individual downloadable items rather than characters, so an archive of a channel that uses them heavily is fetching a large number of small files on top of the obvious attachments. It rarely breaks anything, but it explains why a text heavy export still takes a long time and produces more files than expected.
Media is a switch, not only a slider
The session flag that enables downloading is set whenever any media type is to be fetched with a non zero per file size limit, or when profile pictures or stories are being exported. Two things follow from that. A per file limit of zero is the same as taking no media at all, so an export configured that way will never fail and will never contain a single photo. And profile pictures and stories are inside the media system rather than beside it, which means asking for them turns file downloading on for the whole run.
Why Media Goes Missing Even When the Size Is Fine
File references expire while you are downloading
Telegram does not hand out permanent addresses for files. Every download uses a reference, and the download endpoint has a specific refusal for the case where that reference is no longer good, stating that the file reference expired and must be refetched. A long export is exactly the situation where this happens, because the references gathered at the start of a run are still being used hours later.
A well behaved client refetches the message and tries again. A script written in an afternoon usually does not, which is why homemade exporters produce archives with confident message counts and inconsistent media folders.
Empty and invalid references are a different problem
Two neighbouring refusals cover the cases where the reference was never usable rather than merely stale, one for an empty reference and one for an invalid one. These are not solved by waiting or retrying. They point at the request being built wrong or at the message data being incomplete on the side that made the call, and the practical consequence for you is the same as expiry, a message present and its attachment absent.
Old clients are told to update, in those words
There is also a refusal that exists purely to stop an outdated client from silently mishandling references, which tells the caller that the client has to be updated in order to support file references. If you are exporting through anything other than an up to date official client, this is the first thing to rule out. It is also a reasonable argument for using the official desktop client for anything that matters, since it is the implementation the procedure is written against.
The Export Session Has Rules of Its Own
It is a separate session with an identifier
An export is not just a burst of ordinary requests. Telegram opens a dedicated export session, hands back an identifier, and expects every request that belongs to the export to be wrapped in that identifier. The documentation is unambiguous that this includes the file download calls, not only the message fetching ones. In other words the export is a mode the account enters, not a script the client runs quietly on the side.
Finishing it is a deliberate act
The session is closed by an explicit call, and that call carries a success flag. Completing an export means finishing with the success flag set. Abandoning one means finishing without it. There is a real difference between the two, and it is the reason a cancelled export is not the same as a crashed one from the platform's point of view.
Two refusals tell you the session is the problem
When the session is wrong, Telegram says so directly rather than failing in some ambiguous way. One refusal states that the specified export identifier is invalid, and it appears on the ordinary history and search calls, which is the platform's way of telling a client that it is asking export questions with the wrong credentials. The other, returned with a 403, states that an export session needs to be initialised first. Between them these two cover almost every case where a third party export tool stalls at the very beginning and reports something vague about permissions.
Choosing What Goes In
The checkboxes are flags underneath
The selection screen maps to a specific set of switches. There is one for your contact list, one for private chats with users and bots, one for basic groups, one for supergroups, one for channels, and one for files. The documentation states that the flags must enable exactly the data the user chose to export, which is a polite way of saying the export cannot include something you did not ask for, even by accident.
Basic groups and supergroups are two different switches
This trips up people who think of both as groups. They are separate categories in the protocol, they are enabled separately, and unticking one does not obviously announce what you lost. If a chat you expected is missing from a finished export, this is the first place to look, and it is a far more common cause than any bug.
The migrated group trap
Here is the specific instruction that most homemade exporters miss, and it is stated plainly. When exporting basic group messages, the supergroup switch should be set together with the basic group switch, in order to fetch messages of supergroups that were migrated from a basic group. Almost every long lived Telegram group has been through that migration, usually years ago and often without the owner noticing. An export that ticks basic groups alone can therefore return a group's recent life and lose its beginning, which is the half people usually wanted.
Split Ranges, or Why a Large Archive Is Read in Pieces
History arrives in ranges rather than one stream
For private chats, basic groups, supergroups and channels, the export does not walk the history in a single pass. It first asks Telegram for a list of message ranges, then reads within one range at a time using the normal pagination, and only moves to the next range once the current one is exhausted, restarting the pagination from the beginning each time. This is why a large export can look as though its progress counter goes backwards, and why interrupting one leaves you in a genuinely awkward position rather than simply behind.
There is a shortcut for public material
The documentation notes an exception worth knowing. If the selected chat types are limited to public supergroups and channels, and therefore do not include private chats, bot chats or basic groups, it is enough to use only the last returned range. An export that covers only public material is a much lighter job than one that touches your private messages, and that difference is structural rather than a matter of volume.
Progress bars are built from a one message probe
A small detail that explains a lot of client behaviour. At the start of each range the client makes a request with all offsets set to zero and a limit of one, purely to read the total count so it can draw an honest progress bar. The same probe does double duty, because a range with no messages comes back either empty or with a single placeholder, and the client uses that to skip the range instead of paginating through nothing. When an export appears to stall and then jump, this is usually what you are watching.
Exporting Only Your Own Messages
It uses a different method entirely
If you want a record of what you said rather than everything that was said, the export does not filter the history after fetching it. It uses the search method instead, pointed at the chat, with the sender set to yourself. That is a meaningfully different request, and it is the reason the two kinds of export can take very different amounts of time on the same conversation.
Leaving a channel does not end the story
There is a fallback that is genuinely useful to know about. If a history request fails because the account is no longer in the channel, and the platform's own wording for that refusal is that you have not joined this channel or supergroup, the procedure switches to the sender filtered search variant to fetch the user's own messages anyway. So being removed from a channel does not automatically cost you a record of your own contributions to it, which is worth remembering before a handover rather than after one. If handovers are a live topic for you, the permission side of that is covered in our piece on Telegram admin rights.
Everything in an Export That Is Not a Message
Stories have their own archive
Posted stories are exported from a dedicated story archive rather than from any chat, paginated by passing the identifier of the last fetched story until an empty page comes back, with a count field available for the progress display. Stories are also one of the two things that turn on file downloading for the entire run, so an export that includes them is never a text only export.
Profile pictures are a list, not a picture
Your own profile photos are fetched as a list and paginated in the same style, one hundred at a time, until the pages run out. People forget they have a history of profile pictures at all, and for an account that has been used for business this is often the single most interesting non message item in the archive, because it dates the brand changes nobody wrote down.
Contacts, and the people you talk to most
The contact list is exported as saved contacts, and phone numbers can optionally be resolved to accounts. Separately, the export can include your top contacts, covering correspondents, inline bots and calls. That second list is not something the interface shows you as a list, and it is a surprisingly candid record of how an account was actually used.
Sessions and personal information
The export can also record active sessions and web sessions, along with your personal profile information. Sessions are the part worth reading rather than filing. An export is one of the very few moments when somebody sits and looks at every place their account is signed in, and that is a good moment to notice one they do not recognise. If you run several accounts, that review is a recurring job rather than a one off, and we wrote about the shape of it in managing multiple Telegram accounts.
Date Ranges and the Skip Test
Two probes decide whether a range is even read
When an export is limited to a date interval, the client does not fetch everything and then filter. It uses two cheap probes per range. If the last message in a range is newer than the top of your interval, the range is skipped. If the first message in that range, fetched with a deliberately odd single message request that reads backwards from the start, is older than the bottom of your interval, the range is skipped as well. Everything else is read normally.
Where the date filter earns its place
On an old account this is the difference between an export that finishes over lunch and one that runs overnight. If you are producing a record of one project, one quarter or one dispute, set the interval. The skip logic means the cost of the parts you excluded is close to zero rather than merely reduced.
What New Members Can See Is a Different Setting
Hiding history is an administrator action
People searching for chat history often want the other side of the question, which is what somebody joining today can scroll back to. That is a separate control, applied to the chat rather than to your account, and it hides or unhides message history for new channel and supergroup users. It requires administrator rights, and the platform says so in the plainest possible terms, that you must be an admin in this chat to do this.
A public chat cannot hide its history
Here is the constraint most admins learn by hitting it. If the chat is public, the setting is refused outright, and the refusal states the reason directly, that the chat is public and you cannot hide the history from new users. There is no partial version of this. A public chat with a searchable address is readable from the beginning, and if that is not acceptable the chat needs to stop being public rather than have the toggle forced.
Forums cannot toggle it at all
The second refusal is one almost nobody expects. If the group has forum functionality enabled, the setting is rejected with a message saying the action cannot be executed because the group is a forum, and that forum functionality must be disabled to continue. Turning a group into a forum is presented in the interface as an organisational nicety, and this is one of the quieter things it takes away. We covered what else changes in Telegram topics.
Software can read the current state
For anybody automating around this, the state is exposed through the bot interface as a field indicating whether new chat members will have access to old messages, and the documentation notes that it is available only to chat administrators. Reading it is far more reliable than trying to infer visibility from what a test account happens to see.
Before You Delete Anything
Clearing a chat clears it for both people
Telegram is unusually direct about deletion. You can delete any message you sent or received for both sides in a one to one conversation, and you can clear an entire chat history on both ends. Telegram also states that deleted messages do not leave a mark in the chat, which is the point of the feature and also the reason to think before using it. There is no tombstone to tell a future reader that something used to be there.
Deleting an account removes the messages and the contacts
Account deletion is described just as plainly, removing all your messages and contacts permanently. The consequence for groups and channels is spelled out separately and is not what most people assume. Every group and channel you created is orphaned and left without a creator, while the admins keep their rights. So the rooms survive and the ownership does not, which is an argument for arranging a proper handover in advance rather than relying on deletion to be tidy.
The order that avoids regret
Export first, verify second, delete third, and treat those as three separate sittings rather than one. The verification step is the one people skip, and it is the only one that catches a media limit set too low, a group category left unticked or a run that stopped at hour seven. An archive you have not opened is not a backup, it is a folder.
A Routine That Survives Being Done Twice
Decide the job, then set the numbers
Write down in one sentence what the archive is for before opening the dialog. If it is for reading, choose HTML, set a generous per file limit and accept the size. If it is for answering questions, choose JSON, set a date range and a modest media ceiling, and plan to run a second targeted export for the few chats where the attachments are the point.
Check the categories against reality
Tick both group types if any of your groups is more than a couple of years old. Include channels if any material you care about was posted rather than sent. If your account was ever used for business, include contacts and top contacts, because those two lists are the record of who you actually dealt with, and no interface reconstructs them later.
Verify like you would verify a backup
Open the archive. Find three specific things you already know are in there, ideally one large file, one old message from before the group migrated, and one custom emoji heavy post. If all three are present, the settings were right. If the large file is missing, the per file limit was the problem and the fix is one number and one rerun. This takes five minutes and it is the whole difference between having an archive and believing you have one.
Where an Archive Ends and a Migration Begins
These are two different jobs
An export produces a record for you. It does not put anything back. If the actual goal is that a channel's content should continue to exist somewhere live, in a new channel, in a backup channel or in a second language, that is content migration and it works on a completely different mechanism. We built Channel Clone for that side, and the difference between the two is worth being clear about before choosing a tool, because an archive cannot be published and a mirror cannot be searched offline. The step by step version of that job is in cloning a Telegram channel, and the neighbouring case of copying a chat that resists being copied is in cloning a restricted channel.
An archive is not a measurement either
There is a third confusion worth heading off. An export tells you what was said and when, which is a record. It does not tell you how a channel performed, because reach, views and growth are not properties of the messages you saved, they are properties of what happened around them afterwards. If the question in your head is closer to whether a channel is working than to what was written in it, the archive will not answer it and no amount of exporting will make it do so. That side lives in Channel Analytics, and the two are complementary rather than substitutes. Export when you need the words, measure when you need the outcome, and do not let a large folder of correct data stand in for a question it was never built to answer.
Accounts outlive archives
The other half of this is prosaic. Most people export because something is ending, and quite a lot of those endings were avoidable. Accounts get restricted, sessions get lost, handovers happen without a plan, and the archive becomes the consolation prize. If you operate several accounts as a matter of routine, the accounts themselves need somewhere to be managed rather than a spreadsheet and a good memory, which is the job Account Manager does, and the recovery side of a restricted account is covered in our note on lifting a spam restriction. An export is a fine safety net. It is a poor plan.
Frequently Asked Questions
Can I export Telegram chat history from my phone
Not the full export. Telegram's instructions point to Telegram Desktop, and its lightweight desktop client can also be used to export your data and chats. A phone can view an archive that was produced elsewhere, but the job itself belongs on a computer.
Why is my exported chat missing photos and videos
Almost always the per file size limit. Telegram's export records a maximum size in bytes for files to download, and anything above that ceiling is simply not fetched while the message that carried it is still saved. Raise the limit and run the export again for the chats that matter.
Does the size limit apply to the whole export or to each file
To each file. It is defined as the maximum size of files to download rather than a total budget, so a ceiling that looks generous against an entire archive can still exclude every long video in it.
Can I export only my own messages
Yes, and it is handled by a different method rather than by filtering afterwards. The export uses a search request aimed at the chat with the sender set to your own account, which is why that kind of export can behave quite differently from a full history export on the same conversation.
Can I export a channel I have already left
Your own messages, yes. If a history request fails because the account is no longer in the channel, the documented procedure falls back to the sender filtered search so that your own contributions are still fetched. The rest of the channel is not available to an account that is not in it.
Why does my old group only export its recent messages
Because the group was almost certainly migrated to a supergroup at some point, and the two are separate switches. The documentation instructs that the supergroup switch be set together with the basic group switch precisely so that migrated history is fetched. Tick both and run it again.
Can I export a secret chat
No. Secret chats exist only on the device where they were started, and logging out loses them. Nothing that never left the device can appear in a cloud export.
Can I stop new members from reading my group's old messages
Only in some cases. The setting exists and requires admin rights, but a public chat is refused outright with the explanation that the chat is public and history cannot be hidden from new users, and a group with forum functionality enabled is refused as well and told to disable the forum first.
Do I lose my groups if I delete my account
They survive without you. Telegram states that deleting an account permanently removes your messages and contacts, and that every group and channel you created is orphaned and left without a creator while the admins keep their rights. Hand over ownership deliberately rather than letting deletion decide.
Should I choose JSON or HTML
HTML if a human will read it and JSON if anything will process it. They come from the same source rather than one being converted from the other, so running the export twice is a legitimate answer when you genuinely need both.
An Archive Is Not a Plan
Exports are what you reach for when something is already ending. The accounts, chats and campaigns that produced all that history are easier to keep alive than to reconstruct from a folder. Open a demo and look at the panel before paying anything.
Try Free Demo