Count your tokens and see how they're done
1
stars
98
commits
TypeScript
primary language
Sep 4, 2026
updated
Interactive GPT Tokenizer Visualization Tool
Explore how different GPT models tokenize your text in real-time. Privacy-focused, client-side processing.
When using OpenAI's API, you're charged per token, not per word. Understanding tokenization helps you:
Example: "Hello, world!" might be:
Visit happytokenizer.com and start typing in the text area. That's it!
View the complete list at happytokenizer.com/models
Want to run HappyTokenizer locally or contribute? Here's how:
# Clone the repository
git clone https://github.com/yourusername/happytokenizer.git
cd happytokenizer
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
src/
├── components/
│ ├── react/ # React components with client-side logic
│ └── Footer.astro # Footer component
├── layouts/
│ └── MainLayout.astro # SEO-optimized base layout
├── pages/
│ ├── index.astro # Main tokenizer page
│ └── models.astro # Complete model manifest
└── utils/
└── modelEncodings.ts # Model configurations
HappyTokenizer is designed with privacy as a core principle:
We welcome contributions! Here's how you can help:
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
98 commits
TypeScript
64.8%
Astro
25.2%
CSS
9.1%
Count your tokens and see how they're done
1
stars
98
commits
TypeScript
primary language
Sep 4, 2026
updated
Interactive GPT Tokenizer Visualization Tool
Explore how different GPT models tokenize your text in real-time. Privacy-focused, client-side processing.
When using OpenAI's API, you're charged per token, not per word. Understanding tokenization helps you:
Example: "Hello, world!" might be:
Visit happytokenizer.com and start typing in the text area. That's it!
View the complete list at happytokenizer.com/models
Want to run HappyTokenizer locally or contribute? Here's how:
# Clone the repository
git clone https://github.com/yourusername/happytokenizer.git
cd happytokenizer
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build for production
pnpm build
src/
├── components/
│ ├── react/ # React components with client-side logic
│ └── Footer.astro # Footer component
├── layouts/
│ └── MainLayout.astro # SEO-optimized base layout
├── pages/
│ ├── index.astro # Main tokenizer page
│ └── models.astro # Complete model manifest
└── utils/
└── modelEncodings.ts # Model configurations
HappyTokenizer is designed with privacy as a core principle:
We welcome contributions! Here's how you can help:
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.
98 commits
TypeScript
64.8%
Astro
25.2%
CSS
9.1%