where are json files for claude code stored on a mac
On a Mac, the JSON files that Claude Code uses are stored inside your user’s
~/.claude home directory, not in Application Support or anywhere in
/Library.
Quick answer: where the JSON files live
The main locations are:
- Global settings & credentials:
~/.claude/settings.json– global config~/.claude/settings.local.json– local overrides (gitignored)~/.claude/.credentials.json– auth credentials
- Project & session data:
~/.claude/projects/<encoded-project-path>/<session-id>.jsonl– conversation transcripts (JSONL, line-by-line JSON)
- MCP / desktop configs (if you use them):
~/.claude.json– user-level MCP config (sometimes used in docs)/Users/<you>/Library/Application Support/Claude/claude_desktop_config.json– only for the Claude Desktop app , not forclaudeCLI / “Claude Code”
So if you’re asking about Claude Code (the CLI tool), the JSON files are
under ~/.claude on macOS.
Detailed breakdown by file type
1. Settings and configuration JSON
These are the files you typically edit to change behavior:
-
Global settings :
~/.claude/settings.json
Applies to all projects unless overridden. -
Local (project-specific) settings :
.claude/settings.jsonin your project root
Committed to git; overrides global settings for that project. -
Local-only overrides :
.claude/settings.local.jsonor~/.claude/settings.local.json
Not committed, used for personal tweaks.
2. Credentials and auth
- Credentials :
~/.claude/.credentials.json
Stores your OAuth / API key auth info so you don’t re-login every time.
3. Conversation transcripts (JSONL)
Claude Code logs every session as a JSONL file (one JSON object per line):
-
Location :
~/.claude/projects/<encoded-project-path>/<session-id>.jsonl -
What’s inside :
Each line is an event: user message, assistant response, tool call, tool result, system event.
You can inspect these with:
bash
ls ~/.claude/projects
head ~/.claude/projects/your-project/some-session-id.jsonl
Or with jq/Python if you want to parse them.
4. MCP and “desktop” configs
There are two different products:
- Claude Code (CLI) : uses
~/.claudeand~/.claude.jsonfor MCP configuration.
- Claude Desktop app : uses
/Users/<you>/Library/Application Support/Claude/claude_desktop_config.json.
If you’re running claude in your terminal, you care about the ~/.claude
paths, not the Application Support one.
How to quickly find them on your Mac
Run these in Terminal:
bash
# Show the main .claude directory
ls -la ~/.claude
# List all JSON/JSONL files under it
find ~/.claude -type f \( -name "*.json" -o -name "*.jsonl" \)
That will show you:
~/.claude/settings.json~/.claude/.credentials.json- All session JSONL files under
~/.claude/projects/
Information gathered from public forums or data available on the internet and portrayed here.