Claude Code chat history stored in local project session files

How to Find and Back Up Your Claude Code Chat History Locally

Quick answer

  • Yes. Claude Code chat history is stored locally on the computer, typically as session files under ~/.claude/projects/ on macOS/Linux and %USERPROFILE%.claudeprojects on Windows.
  • Check ~/.claude/projects/ on macOS or Linux.
  • On Windows, check %USERPROFILE%.claudeprojects.
  • Use Claude Code's session-resume options, such as claude –resume or claude –continue, if applicable to the installed version.
  • Claude Code stores conversation history locally.

Yes—Claude Code chat history is stored locally on your computer. On macOS and Linux, the usual location is ~/.claude/projects/. On Windows, check the corresponding location, %USERPROFILE%.claudeprojects, although the exact path can vary by installation. Individual sessions are generally saved as .jsonl files inside project-specific folders.

This applies specifically to Claude Code, not automatically to Claude web or Claude Desktop. The locations below are commonly reported by third-party sources rather than confirmed in an official Anthropic storage reference, so paths and implementation details may change between versions.


Where Claude Code stores chat history

PlatformLocationNote
macOS and Linux~/.claude/projects/Usual location
Windows%USERPROFILE%.claudeprojectsCorresponding location; verify locally

On macOS or Linux, start by checking:

~/.claude/projects/

On Windows, look under your user-profile directory for .claudeprojects. Treat the Windows path as a typical pattern rather than a guaranteed location for every installation. For a fuller explanation of the location and folder structure, see where Claude Code stores chat history.


How the local session files are organized

The projects directory contains project-specific folders. Within them, individual Claude Code sessions are generally represented by .jsonl files. This organizes history by the project where a session was created instead of placing every conversation in one undifferentiated file.

A session file may include prompts, responses, tool calls and results, command output, file contents used during the session, and other metadata. Treat the directory as sensitive project data. The exact folder structure can vary with the installed version and project context.

How to inspect or search the history

You can inspect the directory with your normal filesystem tools. Because the session files are JSONL text files, a text-search utility such as ripgrep can help you search for project names, prompts, responses, commands, or other session content on macOS and Linux.

Avoid editing session files unless you understand their format and have a backup. Claude Code may not include a built-in browser for every locally stored session, so inspecting the files directly—or using a separate third-party browser or editor extension—may be necessary. Third-party tools are not native Claude Code features and have their own privacy and caching considerations.


How to resume an earlier session

Depending on the installed version, Claude Code may provide session-resume options such as:

  • claude --resume
  • claude --continue

If an earlier session does not appear, check the relevant project folder to see whether its local .jsonl file is present. A changed project, working directory, or Claude Code version can affect how sessions are grouped and identified.


Claude Code versus Claude web and Claude Desktop

The local-file answer is specific to Claude Code. It should not be generalized to Claude web or Claude Desktop, which have separate account-managed or server-side storage behavior.

Likewise, memory, incognito, retention, export, and account-deletion rules for Claude-managed conversations should not automatically be applied to Claude Code’s local session files. Do not assume these files appear in Claude account exports, regular Claude search, memory, or account-level deletion controls.


What local storage does—and does not—prove

Local session files do not prove that Claude Code is completely offline. They confirm local storage, but local files alone cannot show the complete data flow during normal use; prompts, outputs, tool information, telemetry, or other data may also be transmitted or processed remotely.

Local storage alone does not establish:

  • How long local session files are retained
  • Whether automatic cleanup occurs
  • Whether the files are encrypted
  • Which file permissions are applied
  • Whether the storage location can be configured

For privacy and security, protect the directory like other files that may contain source code, credentials, command output, or project information.


Backing up, moving, or deleting local history

Copying the relevant ~/.claude/projects/ directory lets you back up Claude Code history. Copying the files back may restore sessions if the installed version still recognizes the same structure. On Windows, use the corresponding project directory under your user profile.

Moving or renaming a project can result in new sessions being written to a new project folder while older sessions remain under the previous folder name. An older conversation may therefore appear to be missing even though it remains in the earlier project path.

Deleting a project’s local history folder can remove those sessions from the Claude Code resume picker. Do this cautiously: deletion may remove your accessible local copy of the conversation or project context, and these local files should not be assumed to follow separate account-level deletion rules.


Frequently asked questions

Does Claude Code save conversations locally?

Yes. Claude Code saves conversation or session history locally, generally as .jsonl files inside project-specific folders.

Where can I find Claude Code chat history?

On macOS and Linux, check ~/.claude/projects/. On Windows, check the corresponding location, %USERPROFILE%.claudeprojects, and verify the exact path on your system.

Does local storage mean no data is sent to Anthropic?

No. Local session files do not prove that Claude Code never transmits or remotely processes information during normal use.

Is Claude Code history the same as Claude web history?

Not necessarily. This answer concerns Claude Code’s local session files. Claude web and Claude Desktop are separate products with their own storage behavior.


Bottom line: Claude Code chat history is stored locally, with ~/.claude/projects/ the primary location on macOS and Linux. Windows uses a typical .claudeprojects pattern under the user profile. These local files confirm local storage, not completely offline operation, specific retention rules, or the full network behavior of Claude Code.