Skip to content

Repository files navigation

Token Visualizer

English | 简体中文 | 日本語 | 한국어

Free token counter. Shows what to cut from your prompt.

Cut a support prompt from 70 to 61 tokens.

  • Counts tokens with OpenAI's real tokenizers
  • Shows which lines cost the most
  • Measures the savings, not a guess
  • Fails CI when a prompt goes over budget

Install

pipx install git+https://gitlab.com/mattbusel/Token-Visualizer.git

Use

$ echo "In order to help you, due to the fact that you asked." | token-visualizer
  Total tokens: 14
  ...
  Applying the phrase and whitespace fixes: 14 → 8 tokens (-6, 43%)

Windows .exe · Browser version · Project site · Reference

More: docs/DETAILS.md

License: MIT

Releases

Packages

Contributors

Languages