Skip to content

Token Counter

Runs in your browser

Paste a prompt to see every token it splits into, inspect any one of them, and check how much of each model's context window it fills.

Click anywhere in the text, or on a token ID, to inspect that token.

Each colour is one token of OpenAI's o200k_base vocabulary.

Models

OpenAI
Anthropic
Google
xAI
DeepSeek

Tokens

49

Exact for GPT-5 models (o200k_base). Each model is listed below.

Characters
215
Words
36
Lines
3
Chars / token
4.39

Where your tokens go

  • Words78%
  • Numbers2%
  • Punctuation14%
  • Whitespace2%
  • Split characters4%
  • 1 character takes more than one token (2 in all): emoji and letters the vocabulary rarely sees.

Context window by model

  • GPT-5.5

    49

    <0.1% of the 1.05M context window

  • GPT-6.1 Sol

    ≈ 49

    <0.1% of the 1.05M context window

  • Claude Opus 5.5

    ≈ 86

    <0.1% of the 1M context window

  • Claude Sonnet 5.5

    ≈ 86

    <0.1% of the 1M context window

  • Gemini 4 Argon

    ≈ 54

    <0.1% of the 1.05M context window

  • Grok 4.7

    ≈ 49

    <0.1% of the 500K context window

  • DeepSeek V4 Pro

    ≈ 65

    <0.1% of the 1M context window

How each count is made

  • GPT-5.5ExactCounted with o200k_base, the vocabulary OpenAI's tiktoken uses for every GPT-5 model.
  • GPT-6EstimateOpenAI hasn't published GPT-6's tokenizer, so this is counted with o200k_base, the vocabulary every GPT-5 model uses.
  • ClaudeEstimateAnthropic doesn't publish Claude's tokenizer. Its docs say the current one makes about 2.5 characters per token (1M tokens is roughly 2.5M characters), so this is characters divided by 2.5.
  • GeminiEstimateGoogle's docs say a Gemini token is about 4 characters, so this is characters divided by 4.
  • GrokEstimatexAI doesn't publish Grok's tokenizer or a ratio, so this is counted with OpenAI's o200k_base as a stand-in.
  • DeepSeekEstimateFrom DeepSeek's published rates: about 0.3 tokens per English character and 0.6 per Chinese character.

Context windows from each provider's model page, checked on 4 November 2026: OpenAI, Anthropic, Google, xAI, DeepSeek.

How this one works

The text is split with o200k_base, the tokenizer OpenAI publishes for its GPT-5 models, running in a background thread of this tab. Each coloured block in the field is one token. Put the cursor anywhere in the text, or click a token ID, to see that token's text with its spaces shown, its ID, its size in bytes and its position.

The breakdown sorts the tokens into words, numbers, punctuation, whitespace and characters the vocabulary had to split, such as emoji, and says when trimming whitespace would save tokens.

Most providers don't publish their tokenizers, so other models are estimated. For Claude, Gemini and DeepSeek the estimate uses the characters-per-token figure each provider documents; GPT-6 and Grok use o200k_base as a stand-in. The list under the models says which is which, and every estimate shows with ≈.

Questions

What is a token?

The unit a language model reads and writes: a common word, part of a longer word, a punctuation mark or a few bytes of an emoji. Models are priced and limited in tokens, not characters.

Why is my Claude count higher than my GPT count?

Anthropic's current tokenizer, used since Claude Opus 4.7, makes about 2.5 characters per token. OpenAI's makes about four for English. The same prompt is therefore roughly 60% more Claude tokens.

Why does a space get its own colour, or stick to the next word?

Tokenizers attach a leading space to the word after it, so " the" is one token. A run of spaces or a blank line usually becomes tokens of its own, which is why indentation in a prompt costs tokens. Show spaces makes them visible.

How do I get an exact count for Claude or Gemini?

Both providers have a token-counting API that returns the exact number for a request. It needs your API key, which is why it isn't used here.

Is my prompt sent anywhere?

No. The tokenizer runs in your browser and is downloaded once, the first time you edit the text. The prompt stays in memory and is gone when you close the tab.

Keyboard shortcuts

Global

  • Show this shortcuts dialogShift?
  • Toggle light / dark themeCtrlShiftL
  • Close dialogsEsc

Formatter & Validator

  • Format JSONCtrlEnter
  • Minify JSONCtrlShiftM
  • Copy outputCtrlShiftC
  • Download output as .jsonCtrlShiftS
  • Clear input and outputCtrlShiftX

Tree Viewer

  • Focus the search box/
  • Expand all nodesCtrlShiftE
  • Collapse all nodesCtrlShiftR

Diff

  • Swap document A and BCtrlShiftS

Time & date tools

  • Use the current time (Epoch Converter)CtrlEnter
  • Copy the main resultCtrlShiftC
  • Clear the inputCtrlShiftX

PHP Unserialize & Serialize

  • Convert an input over 2 MBCtrlEnter
  • Copy outputCtrlShiftC
  • Download outputCtrlShiftS
  • Clear input and outputCtrlShiftX

Keys & IDs

  • Generate a new token or UUID batchCtrlEnter
  • Copy the resultCtrlShiftC

JSON tools

JSON FormatterPretty-print or minify
JSON ValidatorCheck strict JSON validity
JSON Tree ViewerBrowse JSON as a tree
JSON DiffCompare two documents
JSON Path FinderExplore JSONPath expressions
JSON to CSVFlatten JSON into rows
CSV to JSONTurn rows back into objects
PHP UnserializeSerialized PHP to JSON
PHP SerializeJSON to serialized PHP

JWT tools

JWT DecoderClaims, signature and expiry
JWT VerifierWith a secret, PEM key or JWKS
JWT Expiry Checkeriat, nbf and exp in local time
JWT GeneratorBuild a signed test token
Base64URL EncoderEncode or decode a segment

Time & date tools

Epoch ConverterTimestamps to real dates
Cron Expression ExplainerCron in plain English
Time Zone ConverterOne moment, many cities
Duration CalculatorDate maths and durations

Keys & IDs

Password GeneratorSecure random secrets
UUID Generatorv1, v4, v5 or v7 UUIDs

Code formatters

SQL FormatterBeautify or minify SQL
HTML FormatterBeautify or minify HTML
CSS FormatterBeautify or minify CSS
JavaScript FormatterBeautify or minify JS
PHP FormatterBeautify PHP code
Markdown to HTMLConvert with a live preview

AI tools

Token CounterTokens for every model
Prompt Secret ScrubberHide keys and personal data

Pages

JSON toolsFormat, validate, compare and convert JSON.
JWT toolsDecode, verify and generate JSON Web Tokens.
Time & date toolsConvert timestamps, read cron, compare zones.
Keys & IDsGenerate secure tokens, passwords and UUIDs.
Code formattersFormat SQL, HTML, CSS, JavaScript and PHP code.
AI toolsCount tokens and hide secrets before you prompt.
HomePopular tools and categories
All categoriesBrowse tools by category
AboutWhat ToolJar is and why
PrivacyWhat is and is not collected

Theme

Switch to light theme
Switch to dark theme