Sasindu Bandara
← AppsIn progress

Token, character and word counts as you type — in every AI chat.

What it is

Every LLM pricing calculator assumes four characters per token. That is roughly right for English prose and badly wrong for almost everything else — Sinhala runs about 1.24 characters per token, which is three and a half times more expensive for the same text.

TokenLens splits input by script and applies a separately calibrated ratio to each part, rather than a single blended guess. GPT counts are exact, using the public o200k_base tokenizer bundled locally; the others are estimated, and the extension says which is which instead of presenting both as fact.

It runs entirely in the browser. No keys to paste, nothing leaving the page, no request log of what you were about to send to a model.

What it does

  • Exact GPT token counts with a locally bundled tokenizer
  • Per-script calibration for Latin, Sinhala, CJK and code
  • Live in-page counter on five major AI chat sites
  • Fully offline — no keys, no telemetry, no requests
Built with
JavaScript, gpt-tokenizer, esbuild
Exact for
GPT (o200k_base)
Estimated for
Claude, Gemini, Grok, Kimi
Network access
None

Built by Sasindu Bandara, Software Engineer at Innovative-e, Inc. in Colombo, Sri Lanka.

Other apps

Colombo — GMT+5:30

I'm interested in hard problems at scale — distributed systems, AI integration that actually ships, and teams who care about the second year of a codebase. If that's you, say hello.