Back to guides

Token Basics

Stop Dividing by 4: The Lazy Token Rule That Hides Almost Half Your JSON Bill

We counted 951 samples with OpenAI's o200k_base tokenizer: blog English, technical docs, Python, JSON, CSV, API keys, emoji, Chinese, Japanese, Korean and Russian. The 4-characters rule overcounts plain English by 24% and misses almost half the tokens in JSON and CSV, which is where agent and RAG bills actually come from.

Quick answer

Not reliably. On OpenAI's o200k_base tokenizer, plain English blog text averaged 5.0 characters per token, so dividing by 4 overcounts it by 24%. JSON and CSV averaged 2.1 characters per token, so the same rule misses almost half their tokens. Chinese averaged 1.4 characters per token, about 0.73 tokens per character, and 1,000 English words came to about 1,240 tokens.

ModelInput $/1MCached input $/1MOutput $/1MSourceLast verified How we verify
Claude Sonnet 5.5$2.00$0.10$10.00Official sourceOct 9, 2026

Prices from official provider pages, verified on the date shown.

8 min read - Published Nov 2, 2026 - Updated Nov 2, 2026

Where the 4-character rule comes from

Almost every token guide repeats the same line: one token is about four characters, or about three quarters of a word. It started as a rule of thumb for ordinary English, and people now use it for everything: prompt budgets, context-window checks, cost estimates for agents that stuff tool output into every call.

We wanted to know how far off it is, so we counted. On November 2, 2026 we ran 951 text samples through o200k_base, the tokenizer OpenAI publishes in its open tiktoken library (version 0.14.0). The samples: 416 paragraphs from this blog, 354 Python documentation strings, 53 slices of Python source, 40 CSV tables, 20 JSON files, 30 blocks of API keys, UUIDs and hashes, 15 short messages with emoji, 11 Chinese paragraphs, and four sentences each in Japanese, Korean and Russian.

How many characters is a token? The measured table

Characters per token by content type, o200k_baseTotal characters divided by total tokens for each content type. The 4-character rule assumes every bar sits at 4.0.
  1. English blog writing4.98
  2. English technical docs4.38
  3. Python source4.19
  4. Russian4 sentences3.88
  5. JSON2.11
  6. CSV2.10
  7. English with emoji2.08
  8. Korean4 sentences1.77
  9. API keys, UUIDs, hashes1.55
  10. Chinese1.37
  11. Japanese4 sentences1.34
Show data table
ScenarioCharacters per token
English blog writing4.98
English technical docs4.38
Python source4.19
Russian (4 sentences)3.88
JSON2.11
CSV2.10
English with emoji2.08
Korean (4 sentences)1.77
API keys, UUIDs, hashes1.55
Chinese1.37
Japanese (4 sentences)1.34

Source: AICostBudget measurement, November 2, 2026, tiktoken 0.14.0 with o200k_base. 951 samples.

ContentCharacters per tokenCharacters ÷ 4 gives youWords per token
English blog writing4.981.24x the real count0.81
English technical docs4.381.09x0.66
Python source4.191.05xn/a
JSON2.110.53x (misses 47%)n/a
CSV2.100.52x (misses 48%)n/a
English with emoji2.080.52x0.30
API keys, UUIDs, hashes1.550.39xn/a
Chinese1.370.34xn/a
The rule is wrong in both directions

For plain English it predicts too many tokens, which feels safe. For the text that fills agent and RAG prompts, such as JSON tool results, CSV exports, logs and IDs, it predicts about half the real number. Same rule, opposite mistakes, and the expensive one is the one you do not notice.

Why JSON, CSV and logs break the rule

Tokenizers are trained mostly on prose, so common English words often fit in one token, spaces included. Numbers do not. A price like 4821.37 or a date like 2026-07-14 splits into several short pieces, and every quote, colon, comma and bracket costs something too. Random strings are the worst case: an API key or a SHA hash has no common chunks at all, which is why that row sits at 1.5 characters per token.

The spread inside each type matters as much as the average. Our JSON files ranged from 1.7 to 2.8 characters per token depending on how many numbers they held, and CSV from 1.6 to 3.9. A table of prices behaves very differently from a table of product names, so one fixed divisor can be off even within the same file type.

Format choice adds a second multiplier on top. In our input vs output tokens guide, the same 1,000-row spreadsheet took 35,290 tokens as CSV and 92,289 as pretty-printed JSON, 2.6 times as many, because JSON repeats every column name on every row. If your agent passes records around as indented JSON, that is the first place to look for savings.

What the mistake costs: one agent, two budgets

Take an agent that reads tool results as JSON: 40,000 characters of JSON per call, 10,000 calls a month. Dividing by 4 says 10,000 tokens per call, or 100 million input tokens a month. At the 2.11 characters per token we measured for JSON, the real figure is about 18,970 tokens per call, or 189.66 million a month.

On Claude Sonnet 5.5 input pricing that is the difference between a planned $200.00 and an actual $379.32 a month, before a single output token. Nothing broke and nobody made a coding error; the estimate was just built on a ratio meant for prose. You can plug the corrected token count into the API cost calculator and see your own version of this gap in under a minute.

The same error shows up in context limits. A JSON payload that the 4-character rule puts at 100,000 tokens is closer to 190,000 in reality, which no longer fits a 128K context window. The first sign is usually a truncation error or an agent that quietly loses the start of its instructions.

How many tokens is 1,000 words?

TextTokens per 1,000 words or charactersWhat the usual rule says
1,000 words of English blog writingabout 1,2401,333 (0.75 words per token)
1,000 words of English technical docsabout 1,5301,333
1,000 Chinese charactersabout 730250 (characters ÷ 4)
1,000 Japanese charactersabout 740250

The words-per-token rule holds up better than the characters rule for English, because it already ignores spaces and punctuation. It is still 8% high for everyday prose and 13% low for technical writing full of function names and version numbers. For Chinese and Japanese, which have no spaces between words, count characters and use about 0.73 tokens each.

Want page counts or the dollar side too? The words-to-tokens quick reference converts common word counts and page lengths, and shows what a 1,000-word prompt costs on three models at today's list prices.

A better rule of thumb you can copy

  • Plain English (emails, articles, chat): divide characters by 5.
  • Technical English and source code: divide by 4.2.
  • JSON, CSV, logs and anything number-heavy: divide by 2.
  • API keys, hashes, base64 and UUIDs: divide by 1.5.
  • Chinese or Japanese: multiply characters by 0.73.
  • Mixed text: count each part with its own divisor and add them up.

If you would rather not do this by hand, our Token Calculator now does exactly this: it weights words, digits, punctuation and Chinese characters separately, using rates fitted to the same o200k_base counts. It lands within about 2% of the real count on everyday English, technical English, code, CSV, JSON and Chinese, where a flat divide-by-4 misses JSON and CSV by close to half. It is free, needs no signup, and the text you paste never leaves your browser, so you can try it on a real production payload.

What this test does not cover

  • Only one tokenizer. Claude, Gemini, Llama and DeepSeek use their own, and the same text can come out at a different count. Before you lock a budget on those models, run real samples through the provider's own token counting.
  • The CSV and JSON files are generated order and metrics tables, not your data. Use the per-type range (1.6 to 3.9 for CSV) as a warning, not a promise.
  • The Chinese set is 11 hand-written paragraphs, and Japanese, Korean and Russian are four sentences each. Treat those rows as directional.
  • The technical docs are Python standard-library docstrings, which are heavier on code names than most product documentation.

FAQ

Is 1 token always 4 characters?

No. Four characters per token is an average for ordinary English. On OpenAI's o200k_base tokenizer our English blog text ran 5.0 characters per token and Python source 4.2, while JSON and CSV ran 2.1, API keys and hashes 1.5, and Chinese 1.4. The more digits, punctuation and non-Latin script in the text, the fewer characters fit in one token.

How many tokens is 1,000 words?

About 1,240 tokens for everyday English prose and about 1,530 for dense technical writing, measured on o200k_base. The common 0.75 words-per-token rule says 1,333, so it is 8% high for plain prose and 13% low for technical docs. Word counts do not work for Chinese or Japanese, which have no spaces; count characters instead.

How many tokens is one Chinese character?

About 0.73 tokens per character on o200k_base in our Chinese paragraphs, so 1,000 Chinese characters is roughly 730 tokens. Japanese came out almost the same at 0.74. Dividing Chinese text by 4 would predict only 250 tokens for those 1,000 characters, about a third of the real count.

Why does JSON use so many tokens?

Three things stack up. Digits split into short pieces, so prices, IDs and timestamps use far more tokens per character than words. Every quote, colon, comma and brace counts. And JSON repeats every key on every record, so the same rows cost more than a CSV with one header line. Our JSON samples averaged 2.1 characters per token, not 4.

How do I estimate tokens without running a tokenizer?

Pick the divisor by content type instead of always using 4: about 5 for plain English, 4.2 for code, 2 for JSON, CSV and logs, 1.5 for keys and hashes, and about 0.73 tokens per character for Chinese or Japanese. For mixed text, count words, digits and punctuation separately, which is what the AICostBudget Token Calculator does.

Check your own text instead of trusting a ratio.

Paste a real prompt, a JSON payload or a CSV export. The Token Calculator counts words, digits, punctuation and Chinese characters at their own measured rates, then prices the result on the model you pick.

Count My Tokens (Free)