Common Issues
Tokens Not Updating
Symptoms:- Token count stays at 0
- Visualization area shows “Escribe algo para ver los tokens…”
- Text input works but no results appear
Wait for initialization
The tiktoken library takes 1-2 seconds to load. Try typing after the page fully loads.From
tokenization-service.js:22-31:Refresh the page
A hard refresh clears cached resources:
- Windows/Linux:
Ctrl + Shift + R - Mac:
Cmd + Shift + R
The fallback tokenization system will activate automatically if tiktoken fails to load, but results will be approximate.
Incorrect Token Counts
Symptoms:- Token counts seem too high or too low
- Numbers don’t match other token counters
- Different results for the same text
Different tokenizer being used
Different tokenizer being used
Tokenizador uses the official tiktoken library. Other tools might use:
- Different tokenizers
- Older encoding versions
- Approximate algorithms
- GPT-4o and GPT-4o Mini use
o200k_baseencoding - GPT-4 and GPT-3.5 use
cl100k_baseencoding - Other models use approximations with ratios
models-config.js:83-92:Model-specific tokenization ratios
Model-specific tokenization ratios
Non-OpenAI models use approximations:
This is expected behavior - different models genuinely tokenize text differently!
| Model Family | Token Ratio | Effect |
|---|---|---|
| Claude (Anthropic) | 1.1 | 10% more tokens |
| Llama (Meta) | 0.95 | 5% fewer tokens |
| Gemini (Google) | 1.05 | 5% more tokens |
| Mistral | 1.02 | 2% more tokens |
| Qwen (Alibaba) | 0.92 | 8% fewer tokens |
Fallback tokenization active
Fallback tokenization active
If tiktoken didn’t load, the fallback system provides estimates.Check the console for:How the fallback works (from
tokenization-service.js:301-340):- Splits text into words and spaces
- Estimates tokens based on word length
- Uses ~2.8 characters per token average
- Creates deterministic IDs
Test with known text
Try “Hello world” with GPT-4:
- Should produce 2 tokens
- Token IDs:
[9906, 1917](may vary by encoding)
Check the active algorithm
Look at the “Algoritmo activo” field in Model Information:
o200k_basefor GPT-4o modelscl100k_base (BPE)for GPT-4- Model-specific descriptions for others
Compare with OpenAI's tokenizer
Use OpenAI’s official tokenizer for GPT models to verify counts match.
Model Not Loading
Symptoms:- Model dropdown is empty
- Can’t select a model
- “undefined” appears in model info
Verify models-config.js loaded
Open console and type:You should see an object with 48 model definitions.
Check for JavaScript errors
Look for syntax errors in the console that might prevent scripts from loading.The correct loading order from
index.html:418-424:If you’re self-hosting, ensure all JavaScript files are properly served with correct MIME types.
Browser Compatibility Issues
Symptoms:- Layout looks broken
- Features don’t work
- Console shows errors about unsupported features
JavaScript
- ES6+ support required
- Classes, async/await
- Arrow functions
- Template literals
CSS
- CSS Grid
- Flexbox
- Custom properties (variables)
- calc() function
HTML5
- Semantic elements
- Data attributes
- localStorage API
APIs
- Fetch API
- Promise support
- setTimeout/setInterval
| Browser | Minimum Version | Recommended |
|---|---|---|
| Chrome/Edge | 90+ | Latest |
| Firefox | 88+ | Latest |
| Safari | 14+ | Latest |
| Opera | 76+ | Latest |
- Update to the latest version
- Enable JavaScript
- Check for extensions that block scripts
- Try in incognito/private mode
Tiktoken Library Loading Issues
Symptoms:- Console shows:
tiktoken no se pudo cargar desde CDN - Fallback system activates
- Token IDs are marked as approximate
- CDN is blocked by firewall/network
- Ad blocker interfering
- CORS issues
- CDN temporarily unavailable
index.html:76-144):
Check CDN access
Test if you can access:Open this URL in your browser. If it doesn’t load, you have a network issue.
Disable ad blockers temporarily
Some ad blockers (uBlock Origin, Brave Shield) block CDN scripts.Try disabling them for tokenizador.alblandino.com
Use the fallback
The fallback system works well for most use cases:
- Provides reasonable estimates
- Handles all model types
- Marks tokens as “approximate”
Accuracy is typically within 5-10% of actual tiktoken results.
index.html:148-181):
Performance Issues
Slow Tokenization
For very long texts (>50,000 characters):Disable visualization
Token visualization can be slow for huge texts. Focus on the token count instead.
High Memory Usage
Symptoms:- Browser tab becomes sluggish
- Page crashes with very long text
The token visualization stores all token objects in memory. For texts >100k tokens, this can be intensive.
- Clear text and start fresh
- Close other browser tabs
- Use the Clear button frequently
- Consider exporting results instead of keeping them in the UI
Error Messages
”Error al analizar el texto”
Full error from token-analyzer.js:103:- Tokenization service not initialized
- Invalid model selected
- Text contains problematic characters
- Refresh the page
- Wait for initialization to complete
- Try a different model
- Check console for specific error details
”oldString not found in content” (Development)
This error occurs when trying to use the Edit tool on files. Not relevant for end users - only affects developers modifying the source code.Getting Help
FAQ
Check frequently asked questions
GitHub Issues
Report bugs or request features
View Source
Examine the code for debugging
How to Use Guide
Complete usage instructions
Still Having Issues?
If none of these solutions work:-
Open a GitHub issue with:
- Your browser and version
- Console error messages (screenshot)
- Steps to reproduce
- Text that causes the issue (if applicable)
-
Check browser console for detailed error messages:
- Press F12 (Windows/Linux) or Cmd+Option+I (Mac)
- Click “Console” tab
- Look for red error messages
- Try the live demo at tokenizador.alblandino.com to see if it’s a local issue