cd /news/ai-tools/i-built-a-chrome-extension-that-show… Β· home β€Ί topics β€Ί ai-tools β€Ί article
[ARTICLE Β· art-18970] src=dev.to pub= topic=ai-tools verified=true sentiment=↑ positive

I built a Chrome extension that shows your ChatGPT token usage in real-time

A developer built a Chrome extension called ChatGPT Counter that displays real-time token usage directly on ChatGPT pages. The extension intercepts ChatGPT's internal SSE API responses to track token counts, showing a color-coded progress bar that updates as users type and receive responses. It automatically detects the model in use and tracks against the user's actual daily limit, resetting at midnight.

read1 min publishedMay 31, 2026

Ever wonder how many tokens you've actually used in ChatGPT today? I did β€” and I couldn't find anything that tracked it properly, so I built one.

ChatGPT Counter is a lightweight Chrome extension that sits at the top of every ChatGPT page and tracks your daily token usage live as you chat.

What it does

πŸ“Š Real-time progress bar that updates as you type and receive responses

🎨 Color-coded warnings β€” Blue (normal) β†’ Orange (approaching limit) β†’ Red (danger zone) πŸ€– Model detection β€” knows which model you're using (GPT-4o, o1, etc.)

πŸ“… Plan-aware limits β€” tracks against your actual daily limit

πŸ”„ Auto-resets at midnight

How it works

The extension intercepts ChatGPT's internal SSE (Server-Sent Events) API responses using a page-world injected script, reads the token counts from the stream, and accumulates them with delta-tracking so the count is always accurate across the session.

The trickiest part was getting the fetch interception to work inside ChatGPT's sandboxed environment without breaking the page β€” took a few iterations to get right.

Tech used

Vanilla JavaScript

Chrome Extensions Manifest V3

o200k_base tokenizer (same one OpenAI uses)

CSS for the overlay UI

Try it

⭐ GitHub: [github.com/Dhruvg0/Chatgpt-token-counter](https://github.com/Dhruvg0/Chatgpt-token-counter)

Would love any feedback or contributions!

── more in #ai-tools 4 stories Β· sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/i-built-a-chrome-ext…] indexed:0 read:1min 2026-05-31 Β· β€”