ToolXkit Icon

Token Counter

Estimate how many tokens a prompt will use, with an honest range.

  • Free
  • No signup
  • Nothing uploaded
  • No watermark

Estimated tokens

0

0–0

Characters

0

Words

0

Bytes (UTF-8)

0

How to Count Tokens Before Sending a Prompt

Token Counter: before and after TEXT A YOUR INPUT TOKEN COUNTER DONE A RESULT

AI models do not read words, they read tokens: pieces of words, punctuation and spaces. Context limits and API bills are both counted in tokens, so knowing the number before you paste a long document into a prompt saves money and avoids a cut-off answer.

Paste your text and this counter gives exact counts for OpenAI's two current vocabularies, used by GPT-4o, GPT-4.1 and the o-series, and by GPT-4 and GPT-3.5. For Claude, Gemini, Llama and others, which use their own vocabularies, it gives an estimate with an honest range rather than a false exact figure.

No software to install Free Works on any device

Steps to Measure Your Prompt

  1. 1. Paste the text

    Put your prompt, document or code into 'Your text'. Every count refreshes while you edit.

  2. 2. Say what kind of text it is

    Choose English prose, Source code, or Another script for Chinese, Japanese, Korean, Arabic or Cyrillic. It changes the estimate for non-OpenAI models.

  3. 3. Read the exact counts

    Two boxes show the precise token totals for GPT-4o and GPT-4 style models once their vocabularies have loaded.

  4. 4. Check the estimate and totals

    Below, see the estimated tokens with a low to high range, plus characters, words and UTF-8 bytes.

Try it now

What Is a Token Counter?

A token counter splits text the way a language model does and counts the pieces. For OpenAI models this page uses the real o200k and cl100k vocabularies, each a couple of megabytes of data that your browser downloads the first time you paste something and then keeps. The counting itself happens in your tab, so the text you paste is never uploaded.

Why Use Writing and AI Helpers Here?

Rewording a paragraph, shortening a long report or working out what an AI API will cost should not need an account. These tools run on the page’s own code, so they work in every browser and nothing you paste is uploaded.

“A clear summary saves more time than a long read.”
  • Text reworded in several modes
  • No account or API key
  • Token costs estimated up front
  • Long text summarised
  • Nothing uploaded
  • Works on phones and every browser

Popular Uses for Writing Helpers

Everyday writing and AI-budget jobs are where these tools help most.

  • Paraphrasing Reword a sentence or paragraph in a standard, formal, simple or shorter style.
  • Quick summaries Shorten a long article or report into its key sentences to read quickly.
  • Cover letters Build a cover letter in our résumé partner ResumeCrisp, free.
  • API cost planning Count tokens and estimate the cost before sending text to a paid language model.

What the Token Calculator Reports

Exact OpenAI counts

Real tokenisers for GPT-4o, GPT-4.1, o-series, GPT-4 and GPT-3.5, not a characters-divided-by-four guess.

Ranged estimate for other models

Claude, Gemini and Llama get an estimate with a low and high bound, clearly labelled as an estimate.

Text type setting

Code and non-Latin scripts use more tokens per character than English prose, and the estimate adjusts for that.

Private prompts

Nothing leaves your browser, which matters when the prompt contains client data or source code.

Why Use ToolXkit for Token Counter?

Your files stay with you

Everything runs inside your browser. Nothing you open or type is uploaded to a server.

Writing Helpers for Different Users

Students

Summarise a chapter and reword notes in their own words.

Office workers

Shorten long emails and reports before sending them on.

Developers

Count prompt tokens and estimate LLM costs for a project.

Bloggers and writers

Try different wordings of a sentence and pick the clearest.

Best Times to Use These Helpers

They are useful when you are:

  • Rewording something that sounds blunt
  • Short of time to read a long text
  • Revising for an exam
  • Budgeting for an AI project

Tips for Fewer Tokens

  1. Strip repeated headers, footers and page numbers from pasted documents. They cost tokens and add nothing.

  2. Minified code has fewer characters but not always fewer tokens. Test both versions here before assuming.

  3. Hindi, Tamil and other non-Latin scripts often take several tokens per word. Budget more room for them.

  4. Leave space for the answer. If a model allows 128,000 tokens, a prompt of 120,000 leaves little room to reply.

  5. Multiply the count by your provider's price per million tokens, or use the LLM cost calculator to do it for you.

Frequently Asked Questions

Answers to common questions about this tool.

How many tokens is 1,000 words?

For English prose with OpenAI's current models, usually around 1,300 to 1,400 tokens. Code, numbers and other languages differ a lot, so paste your actual text for a precise count.

Is the count exact for Claude or Gemini?

No. Those models use their own vocabularies, which this page does not have, so it shows an estimate with a range. The two OpenAI figures are exact because the real vocabularies are used.

Why is there a short delay before the exact counts appear?

The first time, your browser downloads the two OpenAI vocabulary files, a few megabytes in total. After that the counts appear almost instantly as you type.

Is my prompt sent anywhere to be counted?

No. The vocabularies are downloaded to your browser and the text is counted locally. What you paste is never transmitted.

Do spaces and punctuation count as tokens?

Yes. Punctuation marks are often their own tokens, and spaces are usually attached to the word that follows. Line breaks and indentation in code add tokens too.

Is my text sent to an AI company?

No. The paraphraser and summariser run on the page’s own code inside your browser. Nothing is passed to ToolXkit or to any AI service.

Does Token Counter work on my phone?

Yes. It needs no special browser feature, so it works in Chrome, Safari, Firefox and Edge, on phones and computers.

Should I check what Token Counter gives me?

Yes. Read the result before you use it — reworded text can change a nuance, and a summary leaves things out by design.

Is Token Counter free, or do I need an API key?

It is free, with no API key and no account.

Further reading

More Writing & AI Helpers

Other free tools for the same kind of job.

Browse all tools