Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Token CounterNew to Visual Studio Code? Get it now.
Token Counter

Token Counter

hplusm

|
6 installs
| (0) | Free
Display token count for files using LLM tokenization standards
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Token Counter Extension

A VSCode extension that displays token counts for your files with cost estimates across popular LLM models.

Features

  • Real-time token counting - Updates as you type
  • Cost analysis - Shows input/output costs for:
    • Claude 4 Opus
    • Claude 4 Sonnet
    • Gemini 2.5 Flash
    • OpenAI o3
  • Clean UI - Minimal sidebar panel with costs
  • Status bar integration - Always visible token count

Usage

  1. Install the extension
  2. Open any text file
  3. Token count appears in the status bar (bottom right)
  4. Click the token count to open cost analysis panel

Configuration

  • tokenCounter.showInStatusBar: Toggle status bar visibility (default: true)

Development

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Open in VSCode (press F5)
code .

Requirements

  • VSCode 1.74.0 or higher
  • Uses GPT tokenization for all models (approximation)
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft