AI Prompt Toolkit

Token Counter

All tools

Paste text to see characters, words and two quick token estimates as you type.

How it works

Four simple steps

1

Paste your text

Add a prompt, system message or document.

2

Read the counts

Characters, words and two token estimates update live.

3

Check input cost

See a rough input price for four reference models.

4

Save the stats

Copy the summary or download it as a text file.

Token Counter

About Token Counter

The API rejected your request for exceeding the context limit, or the monthly bill jumped and you want to know which prompt is responsible. You need a fast token figure without installing a tokenizer library. Token Counter gives you one the moment you paste.

The output lists the character count, the word count and two token approximations: characters divided by four, and words multiplied by 1.3. Below that, an input-cost section multiplies the character-based estimate by built-in reference rates for GPT-4o, GPT-4o mini, Claude 3.5 Sonnet and Claude 3 Haiku. Results update on every keystroke, and you can copy them or download a text file of the stats.

The two estimates bracket the real number for most English text. They drift apart on code, JSON and languages without spaces, where the word-based figure is usually too low. When accuracy matters, for instance near a hard context limit, confirm with the provider's own tokenizer. To see roughly where a heuristic would split your text, open the Token Visualizer. To check a prompt against an 8K to 200K window, the Context Estimator shows the percentage used. The LLM token cost comparison guide covers why counts differ between vendors.

Counting is simple arithmetic on the text in this tab, so you can paste internal documents without them leaving the page.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

One divides characters by four and the other multiplies words by 1.3. Both are common rules of thumb. When they agree, the estimate is probably close; when they differ a lot, your text is unusual and a real tokenizer will be more reliable.

No. It only prices the text you pasted as input tokens. Use LLM Cost Estimator when you also want to account for output length and daily call volume.

Less so. Code, JSON, URLs and scripts such as Chinese or Japanese often use more tokens per character than English prose. Add a margin or verify with the vendor tokenizer.

View more FAQs

Related tools

View all

LLM Cost Estimator

Estimate multi-model API cost from tokens or pasted prompts.

Open

RAG Chunk Simulator

Split documents into RAG chunks with overlap, variance heatmaps, and cost estimates.

Open

Chat Messages Studio

Build and convert OpenAI/Anthropic chat message JSON payloads locally.

Open

Prompt Eval Rubric

Score prompt variants against weighted rubrics before spending API credits.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools