LLM Tokens
Count the tokens in a file, a selection or a whole project, for GPT, Claude, Gemini and more at once.
LLM Tokens is a token counter for VS Code. It shows how many tokens your open file or selection is for every current GPT, Claude, Gemini, Grok, DeepSeek, Kimi and Qwen model, and how much of each model's context window that fills. Embedding models from OpenAI, Google and Voyage AI get their own counts. Right-click a folder to see where a project's tokens are. Counts are exact wherever the maker publishes its tokenizer and marked as estimates where it does not. Everything is counted on your computer, with no API key and no network requests.
Live on the VS Code Marketplace and Open VSXInstall from the Marketplace Open VSX, for Cursor and others
What it does
Out of your way.
- The token count of your file or selection in the status bar, for the model you choose
- A hover table with every current model at once, and the share of each context window
- Embedding models (OpenAI, Google, Voyage AI), with how much of each input limit the text fills
- Count Tokens on any files or folders, with a folder tree of where the tokens are, the largest files, totals by file type and every file it left out with the reason
- Exact counts from the makers' own tokenizers where they publish them, and every estimate marked
- Leaves out what your .gitignore leaves out, plus logs, lock files and build folders, all of it configurable
- Counts in a background process at low priority, so typing is never slowed
Quick facts
Before you install.
- Price
- Free
- Works offline
- Yes, no connection needed
- Account
- None needed
- Platforms
- VS Code, Cursor, Windsurf, VSCodium and other VS Code based editors
- Status
- Out now
Questions
Asked and answered.
- Does LLM Tokens work offline?
- Yes, LLM Tokens works without an internet connection.
- Do I need an account to use LLM Tokens?
- No. There is no sign-up; just install it and start.
- Where can I get LLM Tokens?
- LLM Tokens is free on the VS Code Marketplace (https://marketplace.visualstudio.com/items?itemName=hamperpick.llm-tokens) and on Open VSX, for Cursor, Windsurf and VSCodium (https://open-vsx.org/extension/hamperpick/llm-tokens).
- How do I count tokens in VS Code?
- Install LLM Tokens and open a file. The status bar shows its token count for your main model, and selecting text counts only the selection. Hover the count for every current model at once, or click it to pick the model the status bar shows.
- How do I count the tokens in a whole project?
- Right-click a folder, or several files, in the Explorer and choose Count Tokens. The report shows the total for every model, a folder tree you can open to see where the tokens are, the largest files and every file it left out with the reason.
- Are the token counts exact?
- Where the maker publishes the tokenizer, yes. DeepSeek, Kimi K3, GPT-5.6, OpenAI's embedding models and Voyage AI are counted with the makers' own tokenizers. Anthropic and Google publish no tokenizer for their current models, so Claude and Gemini counts are estimates and are marked with ≈.
- Does LLM Tokens count tokens for embedding models?
- Yes. It counts for OpenAI's text-embedding-3 models and Voyage AI's models exactly, and for Gemini Embedding by Google's rule of about 4 characters a token. It shows how much of each model's input limit the text fills, and the Count Tokens report shows how many files are too long to embed in one input.
- Does LLM Tokens send my code anywhere?
- No. It makes no network requests. The tokenizers ship inside the extension and everything is counted on your computer, in memory.
- Will counting tokens slow down my editor?
- No. Counting runs in a separate background process at low priority, only after you pause typing. That process holds about 100 MB while you work and closes itself after an idle minute.
- Something else?
- Write to contact@hamperpick.in.