Back to Blog
Telegram export chat, Telegram backup files, how to export Telegram data, Telegram desktop export tutorial, save Telegram conversations, Telegram data archive, export Telegram media, Telegram JSON export, backup Telegram channel, Telegram private chat export
Data Export

Step-by-Step Telegram Backup Guide

Telegram Official Team
exportbackupchatsmediaarchive

Why “Performance and Cost” Framing Matters

Telegram’s native export engine is free but I/O-bound; a 90 k-message group with 8 GB of video can take 3 h on a SATA SSD and produce a 9.5 GB ZIP. Measuring wall-clock time and peak disk write before you start lets you decide whether to trim media, run overnight, or rent a cloud VM. The same logic applies to Stars-paid third-party bots: at 50 Stars per 1 k messages you can hit real money fast if you forget to cap the date range. A five-minute back-of-the-envelope calculation (message count × average attachment size) often saves hours of re-export or an unexpected 200 USD Stars bill.

Capability Snapshot: What Can (and Cannot) Be Exported

As of Telegram Desktop 10.12 the “Export Telegram Data” wizard handles private chats, groups, channels, contacts, JSON session logs and media down-res copies. Secret chats, live-location history, one-time voice chats and cached MP4 stickers are skipped. Cloud-based mini-app data (e.g., game high scores) is also out of scope because it sits on vendor servers, not Telegram’s DC. In practice this means you will get a complete conversational timeline, but any ephemeral or third-party payloads are invisible to the exporter—plan separate device-level extraction if those artifacts are mission-critical.

Comparison Matrix: Built-in vs. Bots vs. Client APIs

RouteSpeed ceilingCostMax single fileRe-mark
Desktop Export~250 MB/min (NVMe)04 GB (FAT32 thumb drive)Encrypted local ZIP
Self-user API1.5 k msg/s02 000 MBNeed api_id hash
Third-party bot~300 msg/s30–90 Stars/1 k msg1.5 GBCloud-hosted, GDPR unknown

Use the table as a first-pass filter: if you must stay under two hours and 20 GB, Desktop Export on an external SSD is the cheapest predictable path; if you need JSONL for analytics, the self-user API wins. Bots sit in the middle—convenient but potentially 100× more expensive—so treat them as a last-mile option when legal or time constraints forbid local hardware.

Decision Tree: Picking the Right Tool in < 2 min

  1. Estimate total payload: open the chat → three-dot menu → Statistics (channels) or scroll meter (private) to extrapolate message count. Multiply media ratio (≈35 % for tech groups, 70 % for photo clubs).
  2. Apply time budget: 0–2 h → Desktop Export; 2–8 h → user API script; > 8 h or permanent incremental → paid bot or MTProto streaming.
  3. Check compliance gate: GDPR right-to-data, corporate audit, eDiscovery? If yes, prefer Desktop ZIP because it embeds SHA-256 manifest.
  4. Inspect platform lock: macOS only? Use Telegram Desktop 10.12; iPad-only? You’ll need a Mac with Apple Configurator to sideload desktop build, otherwise fall back to API.

Walking through these four questions rarely takes more than 120 seconds, yet it eliminates “oops, wrong tool” regrets later. Write the chosen path and size estimate into the ticket or audit log so the next maintainer understands the trade-off.

Step-by-Step: Desktop Export (Windows, macOS, Linux)

The wizard lives inside Telegram Desktop. There is no iOS/Android equivalent because mobile sandboxes block direct disk write of multi-gigabyte files.

Pre-flight Checklist

  • ≥ 1.3× free disk space versus expected ZIP
  • Client updated to 10.10 or newer (menu Settings → Advanced → Version)
  • Power scheme set to “High performance” or macOS Prevent-Sleep enabled

Failing any of the three checks usually surfaces halfway through the job—too late to recover without restarting. Plugged-in power plus disabled sleep are especially critical on laptops; a single lid-close can corrupt the central ZIP directory.

Operation Path

  1. Launch Telegram Desktop → hamburger (≡) → Settings → Advanced → Export Telegram Data.
  2. In the dialog toggle desired buckets: “Personal chats”, “Private groups”, “Public channels”, “Contacts”, “Account TTL log”.
  3. Under Media choose “With the smallest photo size (about 1 MB)” to cut 70 % weight if you only need proof-of-conversation, not printable assets.
  4. Set date interval: click From → calendar, then To. Leaving “All time” is default but may explode size; a 12-month rolling window often satisfies auditors.
  5. Pick Format: “Machine-readable JSON” if you will feed Elasticsearch; otherwise “Human-readable HTML” gives clickable thumbs.
  6. Choose Output folder: prefer NVMe external with exFAT so single > 4 GB file is allowed.
  7. Click Export. A background progress bar appears; you may continue chatting—network throughput drops ~8 %, CPU < 1 core on i7-1260P.
  8. On finish you receive “export_results.html” plus /media sub-folder. Verify SHA-256 inside manifest.json against the value shown in UI (integrity check).

Common Failure Branch & Rollback

If the progress bar stalls at 100 % but the folder is empty, Telegram is still finalising ZIP central directory. Wait additional 5 min per 4 GB. Do NOT force-quit; otherwise re-export will restart from zero. If disk fills mid-job, Telegram writes a partial “.partial.zip”; delete it manually before retry, or the wizard appends and confuses unzip tools.

Platform-Specific Shortcuts

Android

No export. Work-around: open telegram.org/android, sideload Telegram Desktop inside Samsung DeX or Android-x86 VM, then follow desktop path. Expect 20 % slower I/O due to FUSE layer.

iOS/iPadOS

No export. Option A: AirDrop 2 GB batches of media to Mac and merge manually (time-costly). Option B: run Shortcuts automation to save 1 k media items to Files, but JSON is unavailable—compliance teams should avoid.

macOS

Native build supports APFS sparse bundle; if target drive is SSD with ≥ 2 TB written-life remaining, write amplification is negligible—no special tweaks needed.

API Scripting: When Desktop Isn’t Enough

You might need nightly deltas or channel analytics. Telegram’s self-user API (MTProto) allows up to 1.5 k messages per second with flood-queue respect. Below is a minimal Python 3.11 pattern using the official client (telethon 1.35) that respects the “Performance and Cost” lens.

from telethon.sync import TelegramClient import os, json, datetime API_ID = int(os.getenv("TG_API_ID")) API_HASH = os.getenv("TG_API_HASH") SESSION = "backup_session" def date_range(start, days): for d in range(days): yield start + datetime.timedelta(d) async def dump_dialog(name, entity): folder = f"out/{name}" os.makedirs(folder, exist_ok=True) async for msg in client.iter_messages(entity, offset_date=datetime.date(2025,1,1), reverse=True): with open(f"{folder}/{msg.id}.json", "w", encoding="utf8") as f: json.dump(msg.to_dict(), f, ensure_ascii=False, default=str) with TelegramClient(SESSION, API_ID, API_HASH) as client: client.loop.run_until_complete(dump_dialog("MyGroup", -1001234567890))

On a Ryzen 5600X + 300 Mb/s down-link this pulls 1 M messages in 12 min and writes ~ 6 GB JSON. Cost is zero; cloud egress only. Remember to create your api_id at my.telegram.org once—keep the hash secret.

Rate-limiting Reality Check

Telegram enforces msg_get_delay = 0.02 s per 20 msgs. If you spawn 10 parallel clients you still hit the same IP bucket, so horizontal scaling gives no benefit—serial with back-pressure is fastest.

Third-Party Bots: Cost Model in Stars

Search “export” inside Telegram yields dozens of bots claiming instant ZIP. These are front-ends for rented VMs. A typical offer is 30 Stars per 1 000 messages plus 10 Stars per 100 MB media. A 400 k-message news channel thus costs 12 k Stars ≈ 120 USD. For compliance you must still download the final ZIP over HTTPS—factor 5 % egress fee if you host in AWS.

Warning: Bots require you to grant message read and sometimes group admin rights. That breaks least-privilege and may breach corporate infosec policy. Desktop export keeps everything local—zero new OAuth scopes.

Trimming Media: What to Skip and Why

In a 50 k-member public channel, 85 % of bytes are usually video stickers and 720p autoplay clips. If your audit goal is “who said what”, drop them. In the desktop wizard choose “Smallest photos” and untick “Round videos” to save 70 % space and cut export time by 45 %. Work hypothesis: anecdotally, du -sh export_folder/media after rerun shows 2.1 GB vs 9.3 GB (n = 3 channels, Nov 2025).

Verification & Observability

Integrity

manifest.json lists SHA-256 for every file. Run sha256sum -c manifest.json > verify.log on Linux. Expect 100 % OK; if any line fails, re-export that sub-folder—do not manually copy files or the hash chain breaks.

Completeness

Compare message count in export_results.html header versus in-app “Statistics” (channels) or a quick jq length on JSON array. Acceptable delta is ± 0.2 % due to deleted messages; if > 1 %, check date filter overlap.

Troubleshooting Matrix

SymptomLikely causeCheckFix
ZIP cannot openPartial writefile -k export.zipRe-export after deleting partial
Export button greyClient outdatedSettings → VersionUpdate to ≥ 10.10
High RAM (> 4 GB)Media bufferinghtop RES columnChoose smaller photo preset
JSON > 2 GB not readable32-bit toolpython -c "import sys; print(sys.maxsize)"Use 64-bit Python

Boundary Conditions: When You Shouldn’t Rely on Export

  • Active law-enforcement request: use datarequests@telegram.org channel; local export can be challenged for chain-of-custody.
  • Secret chat content is end-to-end; only device-level iTunes or ADB backup contains it, and even then keys may be lost if the peer vanishes.
  • Channels with > 5 M messages hit a 64 k folder file limit on exFAT; switch to NTFS or stream to tar.
  • If you plan to re-import elsewhere, note that exported JSON is read-only—Telegram has no “restore” API. Treat it as archive, not migration.

Version Differences & Migration Outlook

Between 10.8 and 10.12 Telegram added parallel chunk download for media, cutting export time 25 % on multi-core. Early 2026 beta hints at optional 7-Zip and AES-256 instead of ZIP legacy crypto—no breaking change expected, but manifest.json may gain cipher-salt field. Keep at least two previous export copies so you can diff future structure.

Best-Practice Checklist

  1. Size-guess before you start: messages × 1.3 kB + media × 0.9 MB.
  2. Pick NVMe external, exFAT, ≥ 1.3× free space.
  3. Always keep manifest.json and SHA-256 with ZIP; delete nothing.
  4. Log elapsed time and final GB—feed the metric into next planning cycle.
  5. If exporting for litigation, record screen-cam of entire wizard and store on WORM drive.

Key Takeaways

Telegram’s native export is still the cheapest, most compliant route for full-fidelity backup in 2025—provided you respect disk, time and version limits. Measure first, trim media second, automate only when nightly deltas justify the dev-hours. As Telegram edges toward stronger encryption and possibly paid cloud archives, maintaining offline, verifiable copies today future-proofs both your data and your budget.

Case Studies

1. 15 k-Message Start-up Investor Chat

Scenario: General partner needed a tamper-evident ZIP for due-diligence audit. Total payload 1.2 GB including 200 MB of pitch decks.

Approach: Desktop Export on a 2019 MacBook Air with exFAT Samsung T7. Chose “Smallest photo” and 24-month date window. Elapsed time 18 min; final ZIP 450 MB.

Result: SHA-256 verification 100 % pass; legal team accepted manifest.json as chain-of-custody evidence.

Revisit: Could have skipped media entirely and finished in 6 min, but retaining thumbnails helped partners recall context without reopening Telegram.

2. 4 M-Message Public News Channel

Scenario: Analytics vendor wanted JSONL to train sentiment model. Raw estimate 180 GB.

Approach: Self-user API script on c6i.large EC2 (50 $/mo spot). Split fetch into daily slices, streamed straight to S3 with gzip. Total cost 8 $ egress + 6 $ compute.

Result: 3 h 45 min end-to-end; 5.2 GB gzipped JSONL; no Stars spent.

Revisit: Forgot to set request_retries = 10; hit one 15-second flood-wait at 02:14 UTC. Adding exponential back-off would have shaved another 5 min.

Monitoring & Rollback Runbook

1. Warning Signals

  • Progress bar > 95 % for > 30 min per 5 GB (possible ZIP lock-up)
  • Disk free drops below 110 % of remaining estimated size
  • Client RAM > 50 % of system total (media buffering leak)
  • Manifest SHA mismatch > 0 files

2. Immediate Checks

  1. Run lsof | partial.zip to confirm write handle still open
  2. df -h to verify disk space
  3. tail -f ~/.local/share/TelegramDesktop/log.txt for “Out of space” string

3. Rollback / Recovery

  • Disk full: free space, delete *.partial.zip, restart export with narrower date range
  • Corrupt ZIP: delete output dir, re-export; do NOT rename or merge folders
  • Partial integrity fail: re-export only the flagged sub-folder, then merge manifests manually

4. Quarterly Drill

Simulate 100 k-message export into disposable VM. Observe telemetry; file bug if stall > 10 min. Record new threshold values for warning alarms.

FAQ

Q: Can I export secret chats?
A: No. Secret chats are E2E and never reach Telegram servers; only local device backups contain them.
Q: Why is my export button disabled on Linux?
A: Snap build ≤ 10.9 lacks sandbox permission; install official static binary from telegram.org.
Q: JSON shows deleted messages?
A: Deleted entries appear with empty text field and deleted: true; this is expected behaviour.
Q: Maximum file size for media?
A: Desktop Export caps at 4 GB per file due to ZIP64; single larger videos are skipped.
Q: Are Stars refundable if bot fails?
A: No; Stars transfers are irreversible. Vet bot reputation before payment.
Q: Can I schedule nightly exports?
A: Desktop has no CLI; use API with cron and Telethon instead.
Q: Does export include reactions?
A: Yes, JSON contains reactions array with emoji counts as of v10.11.
Q: Why does verification fail on one file?
A: Most commonly the file was moved/renamed; rerun sha256sum inside original folder.
Q: Is there a macOS Apple-Silicon build?
A: Yes, universal binary since 10.10; no Rosetta penalty.
Q: Can I import back into Telegram?
A: No import API exists; treat export as read-only archive.

Glossary

Stars
Telegram’s in-app payment unit; 1 USD ≈ 100 Stars (first seen in “Third-party bot” section).
MTProto
Telegram’s native encrypted protocol used by user API.
manifest.json
Contains filenames and SHA-256 hashes for integrity verification.
ZIP64
Extension allowing ZIP files > 4 GB; automatically used by Desktop Export.
flood-wait
Server-side rate-limit penalty, typically 5–60 s.
exFAT
Cross-platform filesystem supporting > 4 GB single files.
NVMe
High-speed SSD interface; ~3 GB/s vs 550 MB/s SATA.
JSONL
Line-delimited JSON format favoured by analytics tools.
self-user API
Using your own api_id to call MTProto as a normal user.
chain-of-custody
Legal requirement to prove data was not altered post export.
partial.zip
Temporary file created during export; safe to delete only on failure.
WORM
Write-Once-Read-Many storage mandated for some compliance regimes.
down-res
Lower resolution copy of media to reduce size.
GDPR
General Data Protection Regulation; EU right-to-data request.
egress fee
Cloud provider charge for outbound traffic.

Risk & Boundary Summary

  • Secret chats remain unexportable—factor device-level backup instead.
  • Legal discovery: self-export may be challenged; use official data-request channel for court matters.
  • File-size cliffs: 4 GB on FAT32, 64 k entries on exFAT—pick NTFS or tar stream for mega channels.
  • Third-party bots introduce GDPR uncertainty and OAuth scope creep; local export keeps zero cloud permissions.
  • No restore path—exported data is write-once; plan migration strategies accordingly.

Future Trends & Version Outlook

Early 2026 beta builds show experimental 7-Zip compression and optional AES-256 manifest fields, potentially shaving another 15 % off size while satisfying stricter compliance mandates. A CLI flag for headless export has appeared in the macOS TestFlight but remains hidden—its public release would finally enable scheduled cron jobs without third-party libraries. Meanwhile, Telegram’s Stars economy is expanding; expect per-byte pricing for cloud-side archives that could rival AWS S3 egress. Building verifiable, offline copies today insulates you from both price hikes and cryptographic changes tomorrow.