InputTestHub

LLM Token Counter

Estimates how many tokens a piece of text costs, broken down by script, and shows what non-Latin text really costs.

Developer Nothing uploaded No sign-up Free, unlimited
Developer tool
Leave blank to use the preset. Presets go stale — override rather than trust.
Leave at 0 for the preset.
Paste something on the left to see the result.
In short A token is roughly four characters of English text, or about three quarters of a word — so a thousand English words costs around 1,300 tokens. That ratio does not hold outside Latin script, and the difference is the most expensive surprise in using these models: the same sentence in Urdu, Arabic, Hindi or Thai typically costs two to four times more tokens than its English translation, because byte-pair encodings were trained mostly on English and fragment other scripts into more pieces. Chinese and Japanese sit near one token per character. An exact count needs the model's own vocabulary file, which differs per family; this tool estimates structurally and reports the split by script.

How to use the LLM Token Counter

  1. Paste the text.
  2. Read the per-script breakdown, not just the total.
  3. Override the price and window if the preset is out of date.

About the LLM Token Counter

The LLM Token Counter estimates how many tokens a piece of text costs, broken down by script, and shows what non-Latin text really costs. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.

What people use it for

  • Budgeting before sending a large document to a model.
  • Finding out why an Urdu prompt costs so much more than its English version.
  • Checking whether a prompt will fit the context window.

Details

EnglishAbout 4 characters, or 0.75 words, per token
Chinese and JapaneseAround 1 token per character
Urdu, Arabic, HindiTwo to four times the tokens of the same content in English
MethodA structural estimate — a real count needs the model's vocabulary
AccuracyWithin roughly 10% on prose and code
The per-script table is the part worth reading. A prompt that is mostly English with a few hundred characters of Arabic can have a quarter of its cost in that fragment, and the total alone never shows it.

Where this tool stops

An estimate, not a tokenizer. It cannot account for the special tokens a chat format adds around each message, which are typically three to seven per message and matter on short exchanges.

Frequently asked questions

Why does my Urdu text cost so many more tokens?
Because byte-pair encodings were built mostly from English text, so English words are usually one token while an Urdu or Arabic word fragments into several. The same meaning can cost two to four times more, on both the input and the output — which means a chatbot answering in Urdu costs multiples of the same chatbot answering in English, and almost nobody budgets for it.
How accurate is this?
Within about 10% on ordinary prose and code, and further out on unusual input — long identifiers, base64, dense punctuation, unusual scripts. It is a structural estimate, because an exact count needs the model's own byte-pair vocabulary, one to two megabytes and different for every family. Use it for budgeting; read the API response's usage field for billing.
Do all models count tokens the same way?
No, and there is no formula to convert between them — only vocabularies. Two models can differ by 10 to 20% on the same text, and a model that changes tokenizer between versions changes your costs without changing its prices.
Does the LLM Token Counter cost anything?
There is no cost and no cap. The LLM Token Counter is not a demo of a paid product, so nothing is held back or watermarked.
Is the LLM Token Counter safe to use with private information?
No. The LLM Token Counter runs entirely in your browser using JavaScript. Your input never reaches inputtesthub.com or any third party — open your browser's Network tab while you use it and you will see no request go out.
What do people use the LLM Token Counter for most?
Typical uses: budgeting before sending a large document to a model. Finding out why an Urdu prompt costs so much more than its English version. Checking whether a prompt will fit the context window. It is built for exactly those cases rather than being a general-purpose tool with this bolted on.
What are the limits of the LLM Token Counter?
An estimate, not a tokenizer. It cannot account for the special tokens a chat format adds around each message, which are typically three to seven per message and matter on short exchanges. Knowing where a tool stops being trustworthy matters more than the cases where it works.
What are the reference figures here?
English is About 4 characters, or 0.75 words, per token. Chinese and Japanese is Around 1 token per character. Urdu, Arabic, Hindi is <b>Two to four times</b> the tokens of the same content in English. These are printed on the page itself, so you do not have to take them on trust.
Can I use the LLM Token Counter on mobile?
Yes. The page is responsive and the utility works in Chrome, Safari, Firefox, Edge and Samsung Internet on both Android and iOS. There is no app to install and nothing to sign into.

Related developer tools

All 92
01

System Prompt Linter

Checks a system prompt for the patterns that reliably cause trouble, and shows what it costs…

02

Chat Transcript Splitter

Splits a long transcript into chunks under a token budget, breaking on speaker turns rather…

03

JSON Formatter

Formats, indents and validates JSON with precise error positions, key sorting and a…

04

JSON Validator

Checks whether JSON is valid and reports the exact line, column and reason for the first error…

05

JSON Minifier

Strips all whitespace from JSON to produce the smallest valid output, showing the bytes saved.

06

JSON to CSV Converter

Converts a JSON array of objects into CSV, flattening nested keys and handling missing fields…

07

CSV to JSON Converter

Turns CSV or TSV into a JSON array of objects, with type detection for numbers and booleans.

08

JSON to XML Converter

Converts JSON into well-formed XML with a configurable root element and array item naming.

09

XML to JSON Converter

Parses XML and converts it to JSON, preserving attributes and handling repeated elements as…

10

JSON to YAML Converter

Converts JSON to clean YAML with correct indentation, quoting and multi-line string handling.