🔒  100% client-side · Your data never leaves this browser · No uploads, no tracking

AI Token Count

Loading tokenizer...
0
tokens (GPT-4o / cl100k_base)
GPT-4o
$0.00000
input
GPT-3.5 Turbo
$0.00000
input
Claude 3.5 Sonnet
$0.00000
estimated
Gemini 1.5 Pro
$0.00000
estimated

Text Statistics

0
Words
0
Characters
0
No Spaces
0
Sentences
0
Paragraphs
0 min
Reading Time
0 min
Speaking Time
0
Avg Word Length

What is a Token?

Tokens are the basic units that large language models (LLMs) like GPT, Claude, and Gemini use to process text. A token can be as short as one character or as long as one word. On average, 100 tokens equal roughly 75 words. Both API pricing and context window limits are measured in tokens, so counting them before sending a request helps you control costs and avoid truncation.

How This Token Counter Works

Model Pricing Reference

Prices shown are per 1,000 input tokens (as of mid-2026). Actual API costs may vary and should be verified on each provider's official pricing page.

Common Context Windows

Frequently Asked Questions

How accurate is the token count?

For GPT models using tiktoken, it's 100% accurate - the exact same algorithm OpenAI uses. For Claude and Gemini, it's an estimate based on character ratio, typically within 5-10% of actual.

Is my text sent to a server?

No. All tokenization and counting runs entirely in your browser using JavaScript and WebAssembly. Nothing leaves your device.

How many words per token?

Roughly 0.75 words per token for English text, or about 4 characters per token. This varies by language and content type.

Frequently Asked Questions

How accurate is the token count compared to tiktoken?

The tokenizer closely approximates OpenAI’s tiktoken algorithm (BPE rules) and is calibrated per model family. For GPT-class models expect results within a fraction of a percent of tiktoken.

Can I estimate API cost before sending a request?

Yes. Paste your prompt, pick the model (GPT-4o, Claude, Gemini, DeepSeek...), and get input/output token counts plus estimated cost instantly — no API key needed.

Does it work offline?

Completely. Tokenization runs in your browser with no network requests, so you can count tokens even with sensitive prompts.

Does it count words and characters too?

Yes — tokens, words, characters (with and without spaces), lines, and reading time are all reported in one pass.

Tools we recommend

Deploy this tool on Vercel · Ship faster with Cursor · Your static site on Cloudflare

Copied to clipboard!