CCViewer / Help Center / Find the JSONL file

How do I find the JSONL file location of a Claude Code session?

Updated 2026-10-12 · CCViewer Help Center · Applies to Claude Code 2.x

All session files live under one fixed directory: ~/.claude/projects/. If you know the sessionId, locating the file takes seconds; if you don’t, you can search by content or time.

First, understand the directory naming

Each subdirectory of ~/.claude/projects/ corresponds to one project (working directory). The name is derived from the project path: /, _ and other non-alphanumeric characters are replaced with hyphens -. For example:

Project path                       Session directory
/Users/you/Documents/my_app      →  -Users-you-Documents-my-app
/home/you/projects/shop-api      →  -home-you-projects-shop-api

Each session is one file: <sessionId>.jsonl (a UUID like 9a1b2c3d-…).

Case 1: you know the sessionId — just find it

find ~/.claude/projects -name "<sessionId>.jsonl"

Where does the sessionId come from? The easiest way is to type the slash command /status in the conversation — the output includes the current Session ID. You can also get it from the claude --resume session list, error messages, or the "Session ID" field in the viewer’s sidebar.

Case 2: no sessionId — search by content

If you remember something from the conversation (e.g. your original question), grep for it:

# Search all sessions for a keyword, list matching files
grep -l "fix the login page" ~/.claude/projects/*/*.jsonl

# Search only one project directory
grep -l "fix the login page" ~/.claude/projects/-Users-you-Documents-my-app/*.jsonl

Case 3: find recent sessions by time

# List the 10 most recently modified session files
ls -t ~/.claude/projects/*/*.jsonl | head -10

The graphical way: let CCViewer do it

Don’t want to type commands? CCViewer lets you select (or drag in) the entire ~/.claude/projects/ folder: it scans all .jsonl files recursively, groups them by project, sorts by time, and shows each session’s title, path, time range, message count and cost — click to open, no need to know where the file is.

CCViewer folder mode: Claude Code session library grouped by project

macOS tips: opening hidden folders

Replay your Claude Code sessions visually with CCViewer
Open the page and drop in a .jsonl file — or the whole ~/.claude/projects/ folder. Markdown rendering, thinking blocks, tool calls, token & cost stats, all processed locally in your browser. Nothing is ever uploaded.

FAQ

Why can't I find the ~/.claude directory?
Because it starts with a dot and is hidden by default. Press ⌘⇧G in Finder and type the path, or ⌘⇧. to show hidden files; in a terminal, ls -la ~/.claude always works.
There are many jsonl files under a project — which one is mine?
One file equals one session. Filter by modification time (ls -t) or content (grep -l); or import the whole folder with CCViewer, which shows each session’s title and stats so you can tell them apart at a glance.
What is the path on Windows?
Same layout under your user profile: %USERPROFILE%\.claude\projects\<project>\<sessionId>.jsonl.