Export Claude Chat History and Data: Official Steps + Local Search

Blog / Troubleshooting

Export Claude Chat History and Data: Official Steps + Local Search

To export your Claude chat history, use the official data export feature. Sign in, open account settings, request an export from the privacy-related page, and Anthropic emails a download link to your registered address. Unzip the archive and you have your conversations and account data. This article follows that order and ends with a way to organize and search the files locally. Menu names and details change between versions, so treat the official Help Center as the authority.

Why export a copy first?

Conversations often hold prompts you spent time tuning, the revision history of a long document, or notes from debugging something. That content lives only in your account. If you can no longer log in, or the account is restricted or disabled, it becomes hard to get back.

One caveat up front: whether you can still use the export feature after your account status changes depends on the specific status and on Anthropic's handling, and nobody can promise it in advance. The safer habit is to export regularly while everything is normal, rather than looking for a workaround after something goes wrong. For the difference between the two states, see Claude account restricted vs. disabled.

How does the official export work?

The general flow is below. Check the official Help Center for the exact entry point.

  1. Sign in on the web to the account you want to export (whether the mobile app offers this is up to the official documentation).
  2. Open account settings and find an option like "Export data" on the privacy-related page.
  3. Click to request the export. The page confirms that the request was submitted.
  4. Look in your registered mailbox for the email from Anthropic. It contains the download link.
  5. Download the archive while the link is valid. The validity period is stated in the email and the official docs; download it the same day you receive it.
  6. Put the archive in a fixed local folder and keep a second copy on another disk or cloud drive.

Common sticking points:

  • No email: check your spam folder, then confirm that the address shown in settings is the one you are actually reading.
  • Expired link: just request the export again.
  • Can't log in, so can't request: start with Claude can't log in: troubleshooting to tell network problems, verification codes, and account status apart. If you suspect the account was compromised, go to What to do if your Claude account is hacked first.

What is inside the exported archive?

The archive usually contains several JSON files. They include your conversations, and may also include account information, projects, and other data. Which files you get and what the fields are called depends on what you actually receive. Anthropic may also change the format, so do not treat the field names below as a fixed contract.

Once you have the files, look at the structure first instead of guessing at fields:

mkdir claude-export && cd claude-export
unzip ~/Downloads/your-export-file.zip
ls -lh
# inspect the top-level structure of the conversations file
jq 'type, length' conversations.json
jq '.[0] | keys' conversations.json

The file name conversations.json is only an example. Replace it with the name you see after unzipping.

How do I search and organize it locally?

JSON is not friendly to read, but it is not hard to process. The approach: check the fields first, then pull out the parts you want.

The most direct way is to use grep to find which file contains a keyword:

grep -il "keyword" *.json

For context you can use grep -n -C 2 "keyword" conversations.json, but JSON with very long lines will flood your terminal. jq is a better fit in that case.

List conversation titles and timestamps with jq

Use the keys output from the previous step to confirm which field is the title and which is the time, then list them. The field names below are examples; adjust them to your file:

jq -r '.[] | [.created_at, .name] | @tsv' conversations.json | head -20

Filter conversations by keyword

jq -r '.[] | select(tostring | test("keyword")) | .name' conversations.json

This converts each whole conversation object to a string before matching. It is simple but slow. With a large file, confirm the fields with keys first and match only against the title and body fields.

For long-term use, convert to Markdown

Write a small script that walks the conversations and writes each one to a .md file: title, timestamp, then the role and content of each message. Drop the files into your note-taking app or search them with ripgrep. Before writing it, use keys to find the fields that hold the message list and the message text. Do not rely on memory.

How often should I back up?

There is no standard answer. Decide by how important the conversations are:

UsageSuggested frequency
Occasional chat, nothing importantQuarterly, or when needed
Often write documents or draft plans in chatMonthly
Conversations hold important work materialRight after each major project wraps up, and keep a second copy

Two more things to keep in mind:

What else should I do after exporting?

An export only keeps the data in your hands. If the account already has a problem, the next step is to go through official channels. See How to appeal a disabled Claude account for the process. Appeals go only through official support; do not trust third parties who claim they can unban an account for you.

If you also use ChatGPT, the equivalent steps are in How to export ChatGPT chat history.

What if I'm worried about depending on a single account?

Some readers back up their conversations because their workflow depends heavily on one account. One option is to separate the account from the tool: keep important material in your own hands, and connect development tools to models through an API.

AGI Plan is a commercial partner of cdnping. AGI Plan is a multi-provider LLM aggregation gateway, sold as a monthly subscription, paid in RMB, with no overseas credit card needed. It is compatible with both the OpenAI and Anthropic API formats. Tools such as Claude Code and Codex only need one endpoint URL changed, and one quota can be switched across multiple capability groups. Using Claude Code this way does not require a Claude account. To be clear, it is not an officially authorized channel, and some models are marked as available only outside mainland China; see the models page for specifics. For setup, see the AGI Plan getting-started guide. It solves the problem of connecting tools while you write code. It does not replace the official chat history export, and your past conversations in Claude on the web still need to be backed up using the method above.

Summary and next steps

  1. Go to account settings now, request an official export once, and download it before the email link expires.
  2. After unzipping, use jq to inspect the structure and confirm the fields in the conversations file.
  3. Save a second copy of the archive in a different location, then decide whether to convert it to Markdown and build a local index.
  4. If Claude won't open and you can't tell whether it is a service problem or your own network, check cdnping's Claude status page to rule out a server-side outage.

Related articles

Keep reading