Claude Tokenizer

Count tokens for the latest Claude models including Claude Sonnet 4.5, Opus 4.1, Haiku 4.5 and more. Upload text files, PDFs or images, or paste text directly.

We do not store any files or data. They are discarded immediately after processing.

Explore the source code here.

Claude Opus 4.7
Heads up: Claude Opus 4.7 uses a new tokenizer that typically produces more tokens for the same input than Opus 4.6 and earlier models. For reference we also run the Opus 4.6 tokenizer and show both counts below.

Claude Tokens

0

GPT-4o Tokens

Gemini Tokens

Characters

0

Model

Claude Opus 4.7