Convert local Claude and Gemini data exports into a portable Markdown archive, including images and documents that are present in the export. Processing is entirely offline.
- Claude data exports containing
conversations.json - Gemini Apps activity exports from Google Takeout containing
MyActivity.html,MeineAktivitäten.htmlorMeineAktivitaeten.html - Input as an extracted directory or a
.ziparchive
Claude conversations are exported one Markdown file per conversation. Google Takeout does not expose a reliable conversation ID for Gemini HTML activity exports, so Gemini is exported one Markdown file per activity entry.
npx chat-takeout-md ./takeout.zip --output ./chat-archiveYou can also provide an already extracted directory:
npx chat-takeout-md ~/Downloads/Takeout --output ./chat-archiveThe CLI scans the input recursively and detects both supported sources when they are present in the same Takeout folder.
npm install --global chat-takeout-md
chat-takeout-md ./takeout.zip --output ./chat-archiveNode.js 18 or newer is required. The package has no runtime dependencies.
chat-archive/
index.md
manifest.json
claude/
*.md
gemini/
*.md
assets/
claude/
gemini/
Images are embedded using relative Markdown links. Other located attachments such as PDF, DOCX or audio files are copied and linked. If a Claude export only contains attachment metadata or extracted text, the missing binary file is noted in the generated Markdown.
chat-takeout-md <export-directory-or-zip> [options]
-i, --input <path> Export directory or ZIP archive
-o, --output <path> Output directory (default: ./markdown-export)
--claude <path> Explicit Claude directory containing conversations.json
--gemini <path> Explicit Gemini directory containing activity HTML
--no-assets Do not copy located attachments into the output
--dry-run Detect export sources and item counts without writing
--overwrite Replace generated files in an existing output directory
-h, --help Show help
Before writing personal archives, inspect what the converter detected:
npx chat-takeout-md ./takeout.zip --dry-runFor Claude, download your data export and point the CLI at the extracted
folder or ZIP file that contains conversations.json.
For Gemini, Google Takeout stores chat content under My Activity / Gemini Apps. The HTML export contains locally supplied or generated assets when Google includes those files in the archive. Remote thumbnails are not downloaded by this tool.
The CLI never calls an external service and does not upload chat content.
Your source export and generated Markdown archive can contain sensitive data;
keep them outside public repositories. The repository .gitignore excludes
common export and output folders as an additional guardrail.
npm test
npm pack --dry-runTests use small synthetic exports only and cover directory detection, ZIP input, local assets and dry-run behavior.