LLM Token Counter
Visual BPE tokens, model selector, and input cost estimate from the pricing catalog
Prompt text
Paste text to tokenize in a Web Worker
93 chars · 14 words · 1 lines
About this tool
Visual BPE token counter with model-aware encoding and catalog-based input cost estimate. Uses gpt-tokenizer in a Web Worker — no LLM inference.
How to use this tool
Paste text
Load sample or paste your prompt.
Select model
Pick a catalog model for encoding and cost.
Inspect tokens
Colored blocks show each token; count and cost update live.
Frequently asked questions
Does this upload my text?
No. Tokenization runs in a Web Worker with gpt-tokenizer entirely in your browser.
Why is encoding approximate for some models?
Only OpenAI o200k/cl100k encodings ship in gpt-tokenizer. Other models use cl100k_base as an approximation, labeled in the UI.
Related tools
Agent Tool Flowchart Builder
Design agentic tool-call DAGs with decision branches and bounded loops. Validates reachability, cycle handling, and emits clean Mermaid flowcharts — fully in your browser.
AI Agent Memory & Buffer Simulator
Compare sliding window, summary buffer, and vector memory strategies
AI API Client SDK Generator
Generate typed API client SDK files from OpenAPI specifications or cURL requests
AI Code Explainer
Explain code snippets with grounded cloud AI
AI Code Security Auditor
Scan source code for high-confidence OWASP Top 10 vulnerabilities
AI Code Translator
Translate code into idiomatic implementations in another language