Index it
Tools like Tramya read both the claude.ai export and the Claude Code JSONL sessions, classify them by project and make them searchable.
Guide · 10 min
Whether you use claude.ai in the browser or Claude Code in the terminal, your conversations should not be trapped in one vendor. Here is how to export them, back them up, and — if you want — make them searchable again.
Part 1 · claude.ai (web)
Click your avatar (bottom-left), then Settings, then Data privacy.
Click Export data. You are asked to confirm; the export runs in background.
You receive an email within minutes to a few hours with a signed download link. The archive is a ZIP of JSON files.
Move the ZIP out of Downloads to your permanent backup location. Anthropic keeps the download link valid for a limited time.
Part 2 · Claude Code (CLI)
macOS/Linux: ~/.config/claude-code/. Windows: %APPDATA%\claude-code\.
Sessions are stored as JSONL files (one JSON per line). Each file is a conversation with tool calls, edits and outputs.
tar -czf claude-code-backup.tgz ~/.config/claude-code/. Or add the directory to your regular backup.
Sessions may contain paths and code snippets from private projects. Keep the backup outside git.
Part 3 · Make it useful
Tools like Tramya read both the claude.ai export and the Claude Code JSONL sessions, classify them by project and make them searchable.
Once indexed, the context can be handed off to Codex, Cursor or Gemini — you are no longer locked in.
A weekly cron that copies the Claude Code directory to a NAS or a cloud drive is often enough for solo devs.
Part 4 · Formats
Claude’s native export is JSON: great for machines, painful to read. Most people searching for this want Markdown: one .md file per conversation, with YAML front-matter (title, date, model) that drops straight into Obsidian, Logseq or a Git notes repo.
Each conversation in the JSON export is an ordered list of messages. A short script walks them, writes a YAML front-matter block (title, created, model) and renders each turn as a Markdown heading plus body. The claude.ai export and the Claude Code JSONL sessions convert the same way.
Tramya reads both sources directly, classifies them by project, and lets you search and re-open them, with no conversion step and no lock-in. The export stays your fallback; Tramya makes the history usable day to day.
Claude’s own export is JSON. To get Markdown files (one per conversation, with YAML front-matter for title, date and model), convert the JSON with a short script, or use a tool that reads the export. Tramya reads the export and the Claude Code sessions directly and keeps them searchable without a conversion step.
Not directly inside Claude, but you can keep both in one place. Export your ChatGPT conversations, export your Claude history, and index them together in a local tool like Tramya so you can search and move context between agents regardless of where a conversation started.
For claude.ai, refer to Anthropic’s retention policy. For Claude Code, sessions are stored only on your machine; if you delete them locally, they are gone.
The claude.ai export is JSON — any tool that understands the format (or that lets you write a small importer) can ingest it. Tramya has a native importer.
Not officially and versioned. It is stable enough to parse but expect occasional shape changes across major Claude Code releases.
The archive contains your prompts and Claude’s responses. Treat it like source code: no public repos, no shared storage without controls.