Text Toolbox

LLM Token Counter

Free token counter for ChatGPT, GPT-5, GPT-4o, Claude, GLM, and Kimi. Paste a prompt to see token and character counts plus an estimated API cost — instant, no signup.

Model / encoding
Tokens0
Characters0
Words0
Estimated API cost (input) — approximate prices, per 1M tokens

About This Free Online LLM Token Counter

Our free LLM token counter shows how many tokens your text uses for popular large language models — including GPT-5, GPT-4o, GPT-4, Claude, GLM, and Kimi — so you can stay under context limits and estimate API cost before you send a prompt. Paste your text and it instantly tokenizes it with the real OpenAI encodings (o200k and cl100k) for exact GPT counts, and shows a clearly-labelled estimate for models without a public browser tokenizer (Claude, GLM, Kimi), along with the character count, word count, and an approximate per-model cost. Everything runs in your browser, so your prompt is never uploaded and there is no signup. It is essential for prompt engineering, building with the OpenAI, Anthropic, Zhipu, or Moonshot APIs, and budgeting AI usage.

Features of Our LLM Token Counter

  • Exact GPT-5, GPT-4o, and GPT-4 token counts (real OpenAI encodings)
  • Estimates for Claude, GLM, and Kimi (no public browser tokenizer)
  • Live token, character, and word counts as you type
  • Estimated API cost per model
  • Your prompt never leaves your browser
  • Free, instant, no signup

How to Use the LLM Token Counter

Using this tool is simple and requires no signup or registration. Follow these steps:

  1. Paste or type your prompt into the box.
  2. Choose the model / encoding you are targeting.
  3. Read the live token, character, and word counts.
  4. Check the estimated API cost before you send it.

Frequently Asked Questions About LLM Token Counter

What is a token?

A token is a chunk of text — roughly 4 characters or about ¾ of a word in English — that language models read and bill by. A short word is one token; longer or rarer words split into several. This tool counts them exactly using OpenAI’s tokenizer.

Is the token count accurate for GPT-5 and GPT-4o?

Yes for the GPT family. It uses the real OpenAI encodings — o200k_base for GPT-5 and GPT-4o, and cl100k_base for GPT-4 and GPT-3.5 — so those counts match what the API charges. Claude, GLM, and Kimi are shown as estimates, because those providers do not publish a public in-browser tokenizer.

How is the cost estimated?

The cost uses approximate per-million-token input prices for each model multiplied by your token count. Model lineups and prices change often, so treat it as a rough budget, not a billing guarantee — verify the current price for your model before relying on it.

Is my prompt sent anywhere?

No. Tokenization happens entirely in your browser, so your prompt is never uploaded or stored. It is completely private.

Why Choose Text Toolbox?

Text Toolbox provides free, private, and instant online text tools. Unlike other text utility websites that require signup accounts or send your data to servers, all our tools process your text entirely in your browser. This means your content never leaves your device — we cannot see it, store it, or share it. Our tools are fast, lightweight, and work on any device with a modern web browser.

Related Free Online Tools