ai-tokenizer
A faster than tiktoken tokenizer with first-class support for Vercel's AI SDK.
GitHub
NPM
Popular models:
GPT-5
Claude Sonnet 4.5
Gemini 2.5 Pro
GPT-4o
DeepSeek V3
All models
Select a model...
Tokens
0
Characters
0
Encoding
-
Encode Time
-
Input Text
Render
Tokenize Now
Clear
Tokens
Select a model and enter text to see tokens
Note:
Token counts are approximations based on the best available encoding for each model. Accuracy varies by model and context (typically 95-100%). See
accuracy table
for details.