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
pipx install git+https://gitlab.com/mattbusel/Token-Visualizer.git$ 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