Useful Hacks

Token Counter

Count exact tokens for GPT-4o and GPT-4 tokenizers.

Processed locally in your browser. Nothing you paste is sent anywhere.

Overview

Counts the exact number of tokens a piece of text will use, using OpenAI's real tokenizer (tiktoken) — the same library OpenAI's own SDKs use, not an estimate.

How to use it

  1. 1Paste your text.
  2. 2Choose the tokenizer matching your target model family.
  3. 3The token, word and character counts update live.

Tips

  • Claude, Llama and Gemini use different tokenizers than OpenAI's — for those models, treat this as a close approximation rather than an exact count.

Related tools

All ai & llm tools

Search tools

Search for any tool by name, category or keyword