Free Claude Code token counter: your real usage

Drop in your Claude Code logs and see how many tokens you really used. Raw logs repeat each response several times, so a plain total can come out nearly double. This page counts each response once.

Drop your Claude Code projects folder here
or the .jsonl files inside it
Nothing is uploaded. Your files are read and counted inside this browser tab. Nothing is sent anywhere, and nothing is stored. You can turn off Wi-Fi after this page loads and it still works.
Mac~/.claude/projects
In Finder press ⇧⌘G and paste the path. Hidden folders: ⇧⌘.
Windows%USERPROFILE%\.claude\projects
Paste it into the File Explorer address bar.
Linux~/.claude/projects
In the file picker press Ctrl+H to show hidden folders.
Your real usage
0
What a plain sum of the logs says
0
At API list prices
$0
Counted onceRepeated in the logs (counted twice)

By model

ModelTokensResponsesAt list prices

Tokens include cache reads and writes. Dollar figures use Anthropic's published API rates; on a subscription plan they show what the same usage would cost at API rates, not what you were billed.

Want this every day, across every AI company? NeverPayTwice keeps this count up to date, flags every time you were charged again for an answer you already bought, and keeps a receipt for each purchase. Mac, Windows or Linux. $9 one-time.

Try the demoGet NeverPayTwice · $9

Why Claude Code's raw logs over-count

Claude Code keeps a log of every session in ~/.claude/projects, one JSON line per event. Each AI response records its token usage. Adding up every line gives the wrong answer, for three reasons:

  1. One response, several lines. A response is written once per content block (thinking, text, each tool call), and every one of those lines repeats the full usage of the whole response.
  2. Resumed sessions copy history. When you resume a session, earlier lines are copied into a new file, so the same response can appear in more than one log.
  3. Early lines are incomplete. While a response streams, early lines can carry a partial output count. Only the final figure is right.

The fix is to keep one record per response (by its message ID and request ID) and use its final output count. That is what this page and NeverPayTwice do. On our own test machine, a plain sum of 30 days of logs said 100M tokens; the real figure was 50.5M.

Read the full explanation, with a script you can run yourself →