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. Your files and what is in them are never sent anywhere or 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)

Want this count kept right every day, across every AI company? NeverPayTwice keeps it 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, 14-day money-back promise.

Try the demoGet NeverPayTwice · $9

What prompt caching did for you

Caching saved
$0
Without caching, the same tokens
$0
every cached token billed as plain input
Cache reads per token written
0

At Anthropic's API rates. When caching pays off, and when it costs more →

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. Is a plan or the API cheaper for you?

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. Sessions can copy history. A session continued from an earlier one can start a new log file that repeats earlier lines, 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 the made-up sample log in our free scripts repo, a plain sum says 5.3M tokens; the real figure is 1.8M.

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