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
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. Paste the text
Put your prompt, document or code into 'Your text'. Every count refreshes while you edit.
-
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. 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. Check the estimate and totals
Below, see the estimated tokens with a low to high range, plus characters, words and UTF-8 bytes.
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 AI Writing Tools on Your Device?
Rewriting an email, summarising notes or drafting a cover letter is quicker with a starting point. These tools use the AI built into supported browsers, so your text is handled on your own device rather than sent away.
“A rough first draft is easier to fix than a blank page.”
- A first draft in moments
- Long text summarised
- No account or API key
- Token costs estimated up front
- Tone changed to suit
- Grammar and spelling flagged
- Text processed on your device
- Plain explanations of code
Popular Uses for On-Device AI
Everyday writing jobs are where these tools help most.
- Email replies Draft a polite reply or change the tone of an email before sending it.
- Study notes Turn a chapter into short notes, flashcards or quiz questions for revision.
- Cover letters Get a first draft of a cover letter to adapt for a specific job.
- Quick summaries Shorten a long article or report into a few key points to read quickly.
- Product descriptions Write a first version of a product listing for an online shop.
- Meeting agendas Draft an agenda or minutes outline from a few notes about the meeting.
- Code and regex help Get a plain-language explanation of a regular expression, SQL query or code block.
- API cost planning Estimate tokens and 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.
Free, with no catch
No signup, no watermark and no daily limit on how often you use it.
Fast
Results appear in seconds, because nothing has to travel over the internet and back.
Works on any device
Use it on a computer, tablet or phone, in Chrome, Edge, Firefox or Safari.
Nothing to install
No app, no extension and no desktop program. Open the page and start.
Made for real people
Plain words and clear buttons, built by one developer who wanted tools like this to exist.
AI Helpers for Different Users
Students
Make revision notes, flashcards and practice questions from their own study material.
Office workers
Draft emails, agendas and polite replies without starting from an empty page.
Online sellers
Get first drafts of product descriptions, slogans and captions to polish.
Job seekers
Draft cover letters and bios, then edit them in their own voice.
Developers
Understand unfamiliar code or regex and estimate LLM token costs for projects.
Bloggers and writers
Brainstorm titles, outlines and FAQs, then write the real piece themselves.
Best Times to Draft with AI
AI helpers are useful when you are:
- Stuck on the first line
- Answering a pile of emails
- Revising for an exam
- Applying for a new job
- Listing products in a shop
- Reading unfamiliar code
- Budgeting for an AI project
- Softening a blunt message
Tips for Fewer Tokens
-
Strip repeated headers, footers and page numbers from pasted documents. They cost tokens and add nothing.
-
Minified code has fewer characters but not always fewer tokens. Test both versions here before assuming.
-
Hindi, Tamil and other non-Latin scripts often take several tokens per word. Budget more room for them.
-
Leave space for the answer. If a model allows 128,000 tokens, a prompt of 120,000 leaves little room to reply.
-
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.
Why do some AI tools say my browser is not supported?
They use the AI model built into some recent browsers, such as newer versions of Chrome on a computer. If your browser does not have it, the page tells you plainly instead of sending your text elsewhere.
Is my text sent to an AI company?
No. When the built-in browser AI is used, your text is processed on your own device. Nothing is passed to ToolXkit or to an outside AI service along the way.
Should I check what Token Counter gives me?
Yes, always. AI text can sound confident and still be wrong, miss a detail or change your meaning. Treat it as a first draft, check facts and figures, and make it sound like you.
Is Token Counter free, or do I need an API key?
It is free, and there is no API key to enter or account to create. The on-device model belongs to your browser, so there are no per-use charges.
Can I use the result in my work?
Yes. What you create is yours to edit and use. For job applications, college work or published writing, follow the rules of the place you submit to about AI-written content.
Further reading
- Built-in AI (Chrome for Developers) Google’s documentation on the AI models built into Chrome and how they run on the device.
- Large language model (Wikipedia) A general introduction to large language models, what they do well and where they go wrong.
More AI Tools
Other free tools for the same kind of job.
- AI Acronym Expander Expand the acronyms in a document and see which meaning fits. Open tool
- AI API Cost Calculator Per-call and monthly cost from your own token counts and prices. Open tool
- AI Bio Generator A short professional bio in the third person, from your background. Open tool
- AI Blog Outline Generator A structured outline with headings that promise something specific. Open tool
- AI Bullet Point Generator Turn prose into bullets, one idea each, every figure kept. Open tool
- AI Business Name Generator Business name suggestions with a line on why each works. Open tool
- AI Caption Generator Social captions that sound like a person rather than a brand deck. Open tool
- AI Casual Tone Converter Loosen stiff writing into something conversational. Open tool
- AI Code Explainer What a piece of code does, step by step, and what looks wrong in it. Open tool