System Prompt Linter
Checks a system prompt for the patterns that reliably cause trouble, and shows what it costs…
Estimates how many tokens a piece of text costs, broken down by script, and shows what non-Latin text really costs.
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.
| English | About 4 characters, or 0.75 words, per token |
|---|---|
| Chinese and Japanese | Around 1 token per character |
| Urdu, Arabic, Hindi | Two to four times the tokens of the same content in English |
| Method | A structural estimate — a real count needs the model's vocabulary |
| Accuracy | Within roughly 10% on prose and code |
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.
Checks a system prompt for the patterns that reliably cause trouble, and shows what it costs…
Splits a long transcript into chunks under a token budget, breaking on speaker turns rather…
Formats, indents and validates JSON with precise error positions, key sorting and a…
Checks whether JSON is valid and reports the exact line, column and reason for the first error…
Strips all whitespace from JSON to produce the smallest valid output, showing the bytes saved.
Converts a JSON array of objects into CSV, flattening nested keys and handling missing fields…
Turns CSV or TSV into a JSON array of objects, with type detection for numbers and booleans.
Converts JSON into well-formed XML with a configurable root element and array item naming.
Parses XML and converts it to JSON, preserving attributes and handling repeated elements as…
Converts JSON to clean YAML with correct indentation, quoting and multi-line string handling.