Guide · 10 min

Get your Claude conversations out. Keep them yours.

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)

Export from the web interface.

  1. 1. Open your account settings

    Click your avatar (bottom-left), then Settings, then Data privacy.

  2. 2. Request an export

    Click Export data. You are asked to confirm; the export runs in background.

  3. 3. Download the archive

    You receive an email within minutes to a few hours with a signed download link. The archive is a ZIP of JSON files.

  4. 4. Store it safely

    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)

Copy the session directory.

  1. 1. Find the directory

    macOS/Linux: ~/.config/claude-code/. Windows: %APPDATA%\claude-code\.

  2. 2. Understand the format

    Sessions are stored as JSONL files (one JSON per line). Each file is a conversation with tool calls, edits and outputs.

  3. 3. Copy or version it

    tar -czf claude-code-backup.tgz ~/.config/claude-code/. Or add the directory to your regular backup.

  4. 4. Do not commit it to a public repo

    Sessions may contain paths and code snippets from private projects. Keep the backup outside git.

Part 3 · Make it useful

A backup you cannot search is just insurance.

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.

Move it to another agent

Once indexed, the context can be handed off to Codex, Cursor or Gemini — you are no longer locked in.

Automate it

A weekly cron that copies the Claude Code directory to a NAS or a cloud drive is often enough for solo devs.

Frequently asked questions

Does Anthropic keep my history if I delete it locally?

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.

Can I import the export back into another tool?

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.

Is the Claude Code JSONL format documented?

Not officially and versioned. It is stable enough to parse but expect occasional shape changes across major Claude Code releases.

What about privacy?

The archive contains your prompts and Claude’s responses. Treat it like source code: no public repos, no shared storage without controls.