← All text tools

LLM Token Counter and Estimator

Paste a prompt or document to get an estimated token count for GPT, Claude and Llama style tokenizers, with characters, words, context window share and an optional input cost. Every ratio is editable.

  • Free
  • No sign-up
  • Works on any device

About LLM Token Counter and Estimator

Language models read text as tokens, not words, and prices and context limits are counted in tokens. This page estimates the count for GPT, Claude, Llama 3 and Llama 2 style tokenizers from characters per token ratios, treating Latin, CJK and other scripts separately. A 40-character English string at 4 characters per token is about 10 tokens. Real tokenizers differ, so every ratio is editable.

How to use LLM Token Counter and Estimator

  1. Paste the prompt or document into the box.
  2. Pick the model family for the main result and adjust any ratio to match your API's own counts.
  3. Read the estimates, the share of your context window and, if you typed a price, the input cost.

Why use this tool?

Also known as

Frequently asked questions

Is this the exact token count?

No. It is an estimate from typical characters-per-token ratios. Only the model's own tokenizer gives an exact count, and results can differ by 10 to 30 percent, more for code and non-English text.

Why do the four families give different numbers?

Each family uses a different vocabulary, so the same text splits into more or fewer pieces. The ratios here are rules of thumb you can change to match what your API reports.

Is my text sent anywhere?

No. The estimate runs in your browser and nothing you paste is uploaded.

Is LLM Token Counter and Estimator free?

Yes. LLM Token Counter and Estimator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put LLM Token Counter and Estimator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.