Tokens Calculator

ChatGPT / GPT-4 / Llama / DeepSeek Token Counter

Paste once and compare transparent local token estimates for popular model families without sending the text to a server.

o200k_base
0 / 1,000,000 characters

Token visualization

Local token pieces update 0.5 seconds after you stop typing.

0 tokens

Paste text above to see how the selected local encoder splits it into tokens.

Local calculation. Your text stays in this browser. Nothing is uploaded or stored by Tokens Calculator.

One text, multiple counter references

Rows state exactly which local encoding is used, so you can distinguish an available calculation from a provider-specific tokenizer result.

Edit text
Model familyLocal methodTokensScope
ChatGPTOpenAIo200k_base0GPT-4o-style local count
GPT-4OpenAIcl100k_base0GPT-4 local count
LlamaMetacl100k_base0Practical text estimate
DeepSeekDeepSeekcl100k_base0Practical text estimate

Only o200k_base and cl100k_base run in this local tool. Llama and DeepSeek rows are practical cl100k_base estimates, not official provider billing counts.

Side-by-side counts

The same pasted text updates every counter row at once, making encoding differences easy to inspect.

Clear estimate labels

Llama and DeepSeek are labeled as cl100k_base planning estimates rather than presented as official token counts.

No comparison upload

Your text stays in the local browser session while the table recalculates.

Model-specific token counter notes

ChatGPT token counter

The ChatGPT row uses o200k_base as a GPT-4o-style browser count. Conversation wrappers and tools can add API tokens outside pasted text.

GPT-4 token counter

The GPT-4 row uses cl100k_base, giving a local count that matches the model family’s documented base encoding.

Llama token counter

Llama model releases use their own tokenizer details. The cl100k_base row is a fast text-size planning estimate, not a replacement for a Llama tokenizer.

DeepSeek token counter

DeepSeek usage can include provider-specific formatting. Use this cl100k_base result to compare text scale, then verify a production request with the provider.

How it works

  1. 01

    Paste one text sample

    Use the exact prompt, response, or document you want to compare across model families.

  2. 02

    Read the local encoding rows

    Compare the o200k_base and cl100k_base totals, together with the scope note beside each family.

  3. 03

    Confirm a provider-specific bill separately

    Use the comparison for planning, then confirm exact provider tokenization and billing in the relevant API documentation.

ChatGPT / GPT-4 / Llama / DeepSeek Token Counter FAQ

Why do ChatGPT and GPT-4 show different counts?

This page uses o200k_base for a GPT-4o-style ChatGPT estimate and cl100k_base for GPT-4. A text can split differently across those encodings.

Are Llama and DeepSeek rows official token counts?

No. This site deliberately ships only o200k_base and cl100k_base in the browser. Llama and DeepSeek results are transparent cl100k_base planning estimates, not official billing-token claims.

Can I use this page for cost estimates?

The selected GPT, Claude, or Gemini configuration has a local cost estimate. Llama and DeepSeek rows are count comparisons only because this page does not configure their API prices.

Is my comparison text private?

Yes. All count rows update in the browser. The pasted text is not uploaded to Tokens Calculator or any model provider.

Not affiliated with Anthropic, OpenAI or Google.