Lab · AI foundations

See text the way an AI model does.

Language models read text as tokens, small chunks of characters. Paste anything to estimate its token count and see how much of different context windows it would fill.

Your text

0estimated tokens
0words
0characters
0pages (≈500 words)

Token view approximation

Each color is one estimated token. Real tokenizers differ by model, but most English averages about 4 characters per token.

Context window fill

The context window is everything a model can consider at once: instructions, documents and the conversation so far.

What you’ll learn

Why tokens matter.

Cost

You pay per token

API pricing and rate limits are counted in tokens, in and out.

Limits

Context is finite

Long chats and big documents eventually crowd out earlier details.

Quality

Relevant beats more

Retrieve the right passages (RAG) instead of pasting everything.

Code

Code is token-dense

Symbols and indentation often cost more tokens than prose.