Multi-Model Tokenizer Diff Arena

AI Tokenizer & Token Counter

Use this free AI tokenizer and token counter to watch OpenAI, Claude, Gemini, Llama, and DeepSeek split English, code, or Hindi / Japanese / Arabic side by side—and compare the exact token cost across models.

Quick answer

How many tokens does text, code, or an image actually consume?

English prose averages ~4 characters (0.75 words) per token, while source code and JSON average ~3 characters per token.

Expand the details

Non-Latin scripts like Hindi, Japanese, and Arabic often trigger 2×–4× higher token counts under Western-centric BPE vocabularies, and vision inputs follow provider-specific tile or pixel formulas.

  • English prose: ~3.8–4.0 chars/token (1,000 words ≈ 1,330 tokens across o200k_base & Claude).
  • Code & JSON: ~3.0–3.2 chars/token due to brackets, whitespace indentation, and syntax symbols.
  • Non-Latin scripts: Hindi, Japanese, and Arabic can cost 2×–4× more tokens per sentence depending on vocab size.
  • Multimodal vision: 512×512 ≈ 85 tokens, 1024×1024 ≈ 255 tokens (OpenAI tile math), or (w×h)/750 on Claude.
Samples:
Source text
181 chars · 30 words
Token visualization
Paste text above to see tokens.

Hover or tap a token to inspect its id, byte length, and character count.

Side-by-side token counts

Cost of Language / Code

Same text, two models. The delta isolates how much of the bill is tokenizer inefficiency vs sticker price.

Paste text to compute the cost delta.

Compress this text in the Trimmer
Exact vs estimate: o200k_base / cl100k_base run the real BPE (js-tiktoken, WebAssembly-class). Llama/DeepSeek use a byte-level BPE approximation and Claude uses a per-script estimate, because Anthropic and Meta do not publish embeddable tokenizers. All tokenization runs in a Web Worker so the UI never freezes.

Multimodal Input Cost Estimator

Upload an image or PDF to parse its exact dimensions, or model images, PDFs, audio, and video by hand. OpenAI tile math, Claude (w×h)/750, and Gemini fixed rates run side-by-side.

Upload a test image or PDF

Drag & drop an image (PNG/JPG/WebP) or PDF here, or — dimensions are read locally, nothing is uploaded.

OpenAI: 85 + 170 × 512×512 tiles. Claude: (w×h)/750. Gemini: 258 fixed per image.

Cost across 5 reference models

GPT-6.1 SolOpenAI
$0.00187935 tokens
85 + min(ceil(1920/512)×ceil(1080/512)=12, 5 tiles)×170 (×1)
GPT-4o (Omni)OpenAI
$0.00362935 tokens
85 + min(ceil(1920/512)×ceil(1080/512)=12, 5 tiles)×170 (×1)
Claude Sonnet 5.5Anthropic
$0.004102,048 tokens
ceil(1920×1080/750)=2765 → capped at 2048 (×1)

All models (cheapest first)

24 models
Gemini 3.5 Flash-Lite258 tok · Google
$7.74e-5
GPT-6 Luna935 tok · OpenAI
$9.35e-5
DeepSeek Flash935 tok · DeepSeek
$0.00014
Gemini 3.8 Flash258 tok · Google
$0.00019
Claude Haiku 5.52,048 tok · Anthropic
$0.00020
Qwen 2.5 72B935 tok · Alibaba
$0.00033
GPT-4o Mini935 tok · OpenAI
$0.00036
Gemini 3.1 Pro (Preview)258 tok · Google
$0.00052
Llama 3.3 70B (Groq/Together)935 tok · Meta
$0.00055
DeepSeek V4 Pro935 tok · DeepSeek
$0.00062
Gemini 4 Neon258 tok · Google
$0.00064
GPT-5.4 Mini935 tok · OpenAI
$0.00070
Gemini 4 Argon258 tok · Google
$0.00103
Grok 4.3935 tok · xAI
$0.00117
GPT-6.1 Sol935 tok · OpenAI
$0.00187
Grok 4.7935 tok · xAI
$0.00187
Mistral Large 2935 tok · Mistral
$0.00187
Command R+ (Cohere)935 tok · Cohere
$0.00234
GPT-4o (Omni)935 tok · OpenAI
$0.00362
Claude Sonnet 5.52,048 tok · Anthropic
$0.00410
GPT-5.5935 tok · OpenAI
$0.00467
Claude Opus 5.52,048 tok · Anthropic
$0.00819
GPT-6 Astra935 tok · OpenAI
$0.00935
Claude Fable 5.12,048 tok · Anthropic
$0.02048
Model monthly text + multimodal spend in the Cost Calculator
Legacy single-text tokenizer & character-ratio estimator
Loading…

BPE vs. SentencePiece: Why Tokenizers Change Your API Bill

What is a Token Across Providers?

LLMs process language in subword chunks rather than whole words. Because OpenAI (`o200k_base`, `cl100k_base`), Anthropic Claude, Llama 3 / DeepSeek (128K BPE), and Gemini (SentencePiece) train different merge tables, identical text can differ by 10%–35% in billed tokens—especially in multilingual or structured JSON workloads.

How to Compress Prompts Without Losing Accuracy

Eliminate conversational filler in system prompts, use terse bullet rules and compact JSON keys, and strip duplicate few-shot examples. Even a 25% token cut compounds across millions of monthly requests.

LLM Tokenizer & Multimodal Token FAQ

4 short answers — tap a question to expand.

How many words or characters are in one LLM token?

In English prose, 1 token averages 3.8 to 4.0 characters (~0.75 words, or ~100 tokens per 75 words). Code and structured JSON average ~3.0 to 3.2 characters per token because brackets, indentation, and punctuation split into extra tokens.

Why do Hindi, Japanese, and Arabic prompts cost 2x–4x more than English?

Subword BPE vocabularies trained mostly on English text split non-Latin scripts into far smaller byte or character chunks. That increases the exact token count—and your API invoice—for identical semantic meaning.

How do OpenAI o200k_base, Anthropic Claude, Llama 3, and Gemini tokenizers differ?

OpenAI o200k_base uses a 200K-token BPE vocabulary that packs English and code slightly tighter than legacy cl100k_base (100K), Llama 3/DeepSeek use 128K BPE vocabularies, and Gemini uses SentencePiece. Comparing side-by-side exposes hidden 10%–35% token count gaps.

How are images, PDFs, and audio billed as tokens?

OpenAI bills high-detail images by 512x512 tiles (e.g., ~255 tokens for 1024x1024), Anthropic Claude estimates image tokens via (width × height) / 750, and Gemini charges fixed per-image or per-second multimedia rates.