Tools & price references

AI token counter & cost calculator.

Count text tokens using o200k_base or cl100k_base in your browser. See the encoding, token pieces and an input-cost estimate.

Free to useNo sign-upSources and formulas

Tokenizer and cost reference checked

Your text

Processed locally

The price comparison uses this encoding's token count as a planning assumption. It is not an exact tokenizer for Claude, Gemini or unverified model families.

Tokenizer: gpt-tokenizer 4.1.0, bundled locally. License.

Text tokens

Ready

Choose an encoding and count
Characters
13
UTF-8 bytes
13
Estimated input-only cost
Not calculated

No paid API request. No upload of your text.

Counts cover the pasted text only. Message wrappers, tools, images, outputs and model-specific processing can add billed tokens.

Inspect the token boundaries

Tokens are pieces of text, not a fixed number of words. The preview shows up to the first 160 decoded token pieces. Some Unicode characters span token boundaries.

Count your text to inspect the pieces.

Exact encoding counts, bounded billing claims

The counter runs the selected BPE encoding locally. It does not approximate by dividing characters by four. An exact count for an encoding is still not proof that a particular model bills the same number of tokens.

For a production budget, compare this planning count with your provider's actual usage response. The API calculator also accepts measured input and output token counts directly.

Does text leave your browser?

The counter sends no text to a server or model API and does not save it to local storage. Reloading clears your changes. Avoid pasting information that your own browser extensions or shared device should not access.

Estimate the complete request cost.