The fastest way to merge chat exports is a three-step routine: parse each file locally, normalize the timestamps to one format, then stack the rows by matching header names and dedupe. That's it. No cloud upload required, no proprietary format lock-in, and it works whether you're combining a dozen ChatGPT JSON files or three years of a Telegram group's HTML archive.
Here's your immediate checklist:
- Export the chats you need from ChatGPT, Telegram, or WhatsApp (details on each below).
- Pick your merge method: manual for one or two files, a script for volume, a browser tool for convenience.
- Run a dry-run on copies of your files before touching the originals.
Pro Tip: Zip your original exports and set them aside before you start. If a merge script mangles a timestamp or drops a row, you want a clean copy to fall back on, not a half-merged mess you have to untangle by hand.
Key Takeaways
Merging chat exports reliably comes down to normalizing timestamps to one format, matching headers by name instead of position, and deduplicating before sorting chronologically.
| Point | Details |
|---|---|
| Start with a dry-run | Test any merge tool or script on copies of your files before running it on originals. |
| Normalize timestamps first | Convert every export to RFC3339 UTC so files sort correctly once combined. |
| Match headers by name | Column drift happens when tools stack files by position instead of header name. |
| Dedupe with hashing | Use SHA1 on timestamp, sender, and content to catch duplicate rows across exports. |
| Local exports reduce drift | Mastros's browser-based Telegram and WhatsApp extensions export locally with a consistent schema, avoiding cloud uploads. |
Table of Contents
- How Do You Choose a Merge Method?
- How Do You Merge ChatGPT JSON Exports?
- How Do You Merge Multiple Telegram HTML Exports?
- How Do You Combine WhatsApp .txt Chat Exports?
- What's the Standard Pipeline for Normalizing and Merging Any Export?
- Which Tools and Scripts Actually Do This?
- What Goes Wrong During a Merge, and How Do You Fix It?
- Why Local, Browser-Based Exports Simplify the Whole Process
- Try a Local Export Before You Build a Merge Pipeline
- Sources
- FAQ
How Do You Choose a Merge Method?
The right approach depends on how many files you're combining and how much you value keeping data off someone else's server. Merging two chat exports by hand in a spreadsheet is fine. Merging fifty is not.
- Manual (copy/paste or spreadsheet): Works for one to three files. Zero setup, but it's slow and error-prone once you're dealing with more than a handful of conversations.
- Script or CLI: Best when you're combining many JSON, HTML, or TXT files at once. Requires comfort with a terminal, but it's fast, repeatable, and easy to dry-run before committing.
- Browser or local tool: The middle ground for non-technical users who still want privacy. No coding, no uploads, and usually a consistent output schema.
For a small merge (under 10 files), expect 15 to 30 minutes total. For large archives with hundreds of exports, a script running in seconds beats a weekend of manual copy-paste.
How Do You Merge ChatGPT JSON Exports?
Your exported ChatGPT data typically arrives as a conversations.json file or a set of numbered JSON files, depending on how you requested the export. OpenAI's own guidance confirms that exporting conversations doesn't natively support merging account histories or rebuilding your original sidebar. You're on your own for stitching multiple exports into one file, but you can re-upload an exported file into a new conversation as reference material if you just need context, not a full merge.
For an actual merge, the chatgpt-merge CLI (written in Go) handles the conversion cleanly:
chatgpt-merge --dry-run conversations.json
chatgpt-merge --include "Project Alpha,Research Notes" --output merged.csv conversations.json conversations2.json
The dry-run lists conversation titles first, so you can confirm you're merging the right files before anything gets written.
The output maps to three columns: Timestamp (RFC3339, UTC), Role, and Content.
Pro Tip: If you're opening the merged CSV in Excel, save it with a UTF‑8 BOM. Otherwise Excel sometimes mangles emoji and non-Latin characters into garbled symbols.
How Do You Merge Multiple Telegram HTML Exports?
Telegram Desktop exports each chat as one or more numbered HTML files (messages.html, messages2.html, and so on), and large groups with years of history can generate dozens of these files per chat. That's the problem: you're not merging one file per conversation, you're merging a stack of fragments that need to land back in the right order.
- Gather every HTML export file for the chat into one folder, keeping the numbered filenames intact.
- Run an HTML parser or the Telegram HTML merger script on GitHub Gist, which walks the message nodes and stitches them into one structured output.
- Normalize sender names and timestamps as you go. Telegram's HTML export uses local display time, not UTC, so convert it during parsing.
- Decide how to handle media: link to the original files in Telegram's
photos/andvideo_files/folders rather than embedding them, which keeps your merged file lightweight.
The gist's own documentation flags file ordering and message pagination as the most common failure points. If chunk two loads before chunk one, your merged timeline reads backward for that stretch.
Pro Tip: Before running the full merge, spot-check that the numbered HTML files are actually in chronological order. Telegram doesn't always name them the way you'd expect if you exported the chat more than once.

If you'd rather skip HTML parsing entirely, Mastros walks through exporting Telegram chats directly to CSV, which sidesteps a lot of this pagination headache from the start.
How Do You Combine WhatsApp .txt Chat Exports?
WhatsApp exports as plain text, which sounds simple until you try to parse it. On Android, open a chat, tap the menu, choose Export Chat, and pick "without media" unless you specifically need attachments bundled in. On iPhone, it's Settings inside the chat, then Export Chat, same media choice.
The parsing challenges start immediately. WhatsApp's date format changes by device locale, so a US export reads MM/DD/YY while a UK export reads DD/MM/YY, and multi-line messages don't repeat the timestamp on wrapped lines. A basic parse rule: treat any line starting with a date pattern as a new message, and append every line after it (until the next date pattern) to the same message's content field.
- Write a small script that detects the locale's date format from the first few lines before parsing the rest.
- Watch for messages that span multiple lines, like a pasted paragraph or a numbered list someone sent.
- For attachments, WhatsApp exports "media omitted" placeholders when you skip media, so you'll need the full export if you want the actual files referenced.
For tools, a local parser you run yourself keeps everything on your machine. Upload-free web mergers exist too, but confirm the privacy policy before feeding a group chat's export into one.
Pro Tip: If a message look like it's missing entirely after parsing, check whether it was a multi-line message that got split at the wrong point. That's the single most common WhatsApp parsing bug.
What's the Standard Pipeline for Normalizing and Merging Any Export?
Regardless of platform, the same five-step pipeline applies once you've got raw exports in hand.
- Map each source's fields to a common schema. Every platform names things differently, so decide on one set of column names up front.
- Normalize every timestamp to RFC3339 UTC. This is non-negotiable if you want a chronologically accurate merged file. Local time formats from different platforms will not sort correctly against each other.
- Add a source column. Tag every row with which export it came from. This single step saves hours of debugging later.
- Stack files by matching header names, not position. Header-name mismatches are the single biggest cause of column drift when files come from different tools or app versions.
- Deduplicate and sort chronologically. Use SHA1 hashing on the combination of timestamp, sender, and content to catch duplicates that csvkit and similar tools flag as a professional-practice standard, then do a final sort by timestamp.
A workable canonical schema looks like this: Timestamp, Source, Sender, Role, Content, AttachmentRefs, MessageID.
Pro Tip: Name your columns identically across every export before merging, even if that means renaming a field manually first. A merge tool matching by header name will silently create a new column instead of stacking data if "Sender" in one file becomes "From" in another.
Which Tools and Scripts Actually Do This?
Pick based on your platform and comfort level, not brand reputation.
- ChatGPT CLI: chatgpt-merge for JSON to CSV conversion with dry-run support.
- Telegram scripts: the HTML merger gist for stitching numbered exports.
- Local SQLite parsers: tools like chat-export-structurer stream large files and dedupe with SHA1, all offline.
- CSV utilities: csvkit for header-aware merging across formats.
- Browser extensions: Mastros for direct, local exports that skip the parsing step entirely.
Pro Tip: Always test any new tool on a subset of ten or twenty messages first. Confirm the header alignment looks right before you run it against your full archive.
What Goes Wrong During a Merge, and How Do You Fix It?
Most merge failures fall into five categories, and all of them are fixable without starting over.
- Header drift: Column names don't match across files, so data lands in the wrong place. Fix by renaming headers to match before merging.
- Timestamp mismatches: One file uses local time, another UTC. Normalize every timestamp to UTC with its offset before merging, not after.
- Duplicate lines: The same message appears twice if you exported overlapping date ranges. Dedupe with SHA1 hashing or strict row matching.
- Encoding issues: Garbled characters usually mean a file wasn't saved as UTF‑8. Convert encodings before parsing.
- Lost media references: Attachments point to files that moved or got renamed. Keep media in its original folder structure and reference relative paths.
When something breaks, reproduce it on a small sample, confirm your schema matches what you expect, rerun the dry-run, and check the source column to isolate which file introduced the bad data.
Why Local, Browser-Based Exports Simplify the Whole Process
Exports pulled straight from the platform's web interface, without a cloud upload step, tend to arrive in a more consistent shape than exports that got converted twice along the way.
- Direct JSON or CSV downloads mean one less conversion step where formatting can drift.
- A consistent schema across export sessions means less header renaming before you merge.
- No cloud upload means your chat data never leaves your machine before you've decided what to do with it.
Mastros's Telegram and WhatsApp extensions run entirely in the browser, which keeps column structure and metadata consistent across export sessions instead of varying export to export. Media gets referenced rather than embedded, so your merged file stays lightweight. For Telegram, Power Mode connects through your own API credentials for a more complete export when you need it.
Pro Tip: Check the extension's requested permissions before installing anything, run a small test export first, and keep your original ZIP files even after merging. Recovery is easy when you didn't delete your source data.
A Practical Recommendation
If you can export locally through a browser tool, do that first: it keeps schema and metadata consistent from the start. Then run a header-aware CSV merge with a dry-run and dedupe pass. That combination gets you privacy, speed, and accuracy without picking just one.
Try a Local Export Before You Build a Merge Pipeline
Every method in this guide assumes you're starting from a clean export, and that's exactly where most merge headaches actually begin. A script can't fix a header that was inconsistent from the moment it left the platform. Mastros builds its Telegram and WhatsApp extensions to solve that first: exports run locally in your browser, with no cloud upload and no API access required for WhatsApp's read-only mode, so the schema stays consistent every time you pull data. That consistency is what makes the normalize-and-merge pipeline in this guide actually work instead of fighting column drift on every run. Try a free sample export on a small chat through the WhatsApp Scraper Chrome extension or check the full toolset at Mastros before you commit to a bigger merge job.
Sources
- Transfer exported conversations between ChatGPT accounts | OpenAI Help Center
- umayangag/chatgpt-merge
- csvkit — merge CSV
- unixape/chat-export-structurer
FAQ
What Does "Chat Export" Mean?
A chat export is a structured file, usually JSON, HTML, or TXT, containing your conversation history pulled from a messaging platform for backup, analysis, or migration.
Can I Export a Chat From ChatGPT?
Yes. ChatGPT lets you export your conversation history as JSON files, though OpenAI's own documentation confirms this doesn't merge or migrate your full account history automatically.
Can I Transfer ChatGPT Chats to Another Account?
Not directly. You can export conversations and upload the file into a new conversation as reference material, but there's no built-in account-to-account merge feature.
How Do I Export a Chat From Telegram or WhatsApp?
Telegram Desktop offers a chat export to HTML or JSON under each chat's settings menu, while WhatsApp exports as plain text through the "Export Chat" option in the chat menu on both Android and iOS.
Can Mastros Merge My Chat Exports Automatically?
Mastros exports Telegram and WhatsApp data locally in a consistent CSV or JSON schema, which removes the header-drift problem before you even start merging, though the merge step itself still runs through the CSV pipeline described above.
