terset
Color theme

Benchmark

Tokens on every case

Fewer tokens than compact JSON in 9 of 11 cases, on both counters. Tokens counted two ways: the o200k_base tokenizer and Claude's token count for Claude Opus 5.5. Others will differ. JSON means compact JSON, not pretty printed.

Tokens per case, all 11 cases

Each case is scaled to its own largest count. Bar lengths compare real token counts within a case.

  • UI text, uneven rows
    UI text, uneven rows: Terset 504 tokens, JSON compact 695, YAML 802, TOON best 846. −40.4% against TOON, −27.5% against JSON compact.
  • UI text, uniform rows
    UI text, uniform rows: Terset 534 tokens, JSON compact 742, YAML 857, TOON best 539. −0.9% against TOON, −28.0% against JSON compact.
  • Translation batch
    Translation batch: Terset 1,225 tokens, JSON compact 1,450, YAML 1,623, TOON best 1,660. −26.2% against TOON, −15.5% against JSON compact.
  • File list, short
    File list, short: Terset 9,657 tokens, JSON compact 12,806, YAML 14,453, TOON best 10,643. −9.3% against TOON, −24.6% against JSON compact.
  • File list, long
    File list, long: Terset 16,483 tokens, JSON compact 19,627, YAML 22,129, TOON best 17,476. −5.7% against TOON, −16.0% against JSON compact.
  • 200 users
    200 users: Terset 4,718 tokens, JSON compact 6,811, YAML 7,983, TOON best 5,081. −7.1% against TOON, −30.7% against JSON compact.
  • Metrics, numbers and booleans
    Metrics, numbers and booleans: Terset 2,569 tokens, JSON compact 4,797, YAML 6,115, TOON best 2,654. −3.2% against TOON, −46.4% against JSON compact.
  • Deep nested config
    Deep nested config: Terset 411 tokens, JSON compact 371, YAML 456, TOON best 442. −7.0% against TOON, +10.8% against JSON compact.
  • Mixed-type array
    Mixed-type array: Terset 125 tokens, JSON compact 85, YAML 131, TOON best 160. −21.9% against TOON, +47.1% against JSON compact.
  • Reviews, long text
    Reviews, long text: Terset 3,801 tokens, JSON compact 4,279, YAML 4,787, TOON best 3,833. −0.8% against TOON, −11.2% against JSON compact.
  • Orders with line items
    Orders with line items: Terset 3,968 tokens, JSON compact 4,585, YAML 5,673, TOON best 4,419. −10.2% against TOON, −13.5% against JSON compact.

o200k_base: Terset, rules line included, is under TOON's best in 11 of 11 cases and under compact JSON in 9 of 11.

Show as a tableHide table
o200k_base tokens per case for Terset, compact JSON, pretty JSON, YAML, TOON best variant and plain CSV, with totals
CaseTersetJSON compactJSON prettyYAMLTOON bestCSVvs JSON compactvs TOON
UI text, uneven rows5046951,190802846473 lossy−27.5%−40.4%
UI text, uniform rows5347421,261857539504−28.0%−0.9%
Translation batch1,2251,4502,3961,6231,6601,402 lossy−15.5%−26.2%
File list, short9,65712,80616,77114,45310,643n/a−24.6%−9.3%
File list, long16,48319,62723,59522,12917,476n/a−16.0%−5.7%
200 users4,7186,81110,6107,9835,0814,678−30.7%−7.1%
Metrics, numbers and booleans2,5694,7977,5576,1152,6542,531−46.4%−3.2%
Deep nested config411371653456442n/a+10.8%−7.0%
Mixed-type array12585170131160n/a+47.1%−21.9%
Reviews, long text3,8014,2795,1194,7873,8333,769−11.2%−0.8%
Orders with line items3,9684,5857,7495,6734,4194,952 lossy−13.5%−10.2%
Total43,99556,24877,07165,00947,753n/a−21.8%−7.9%

CSV marked lossy did not read back to the same typed data. Terset counts include the rules line. Pretty JSON is in this table only, not in the chart.

Input cost at list price

Input cost at list price, US dollars per 1,000 requests. GPT 6.1 Sol at $2 per million input tokens, context up to 272K.

Input cost at list price, US dollars per 1,000 requests. GPT 6.1 Sol at $2 per million input tokens, context up to 272K.
CaseTersetJSON compactvs JSON compact
UI text, uneven rows$1.01$1.39−$0.38
UI text, uniform rows$1.07$1.48−$0.41
Translation batch$2.45$2.90−$0.45
File list, short$19.31$25.61−$6.30
File list, long$32.97$39.25−$6.28
200 users$9.44$13.62−$4.18
Metrics, numbers and booleans$5.14$9.59−$4.45
Deep nested config$0.82$0.74+$0.08
Mixed-type array$0.25$0.17+$0.08
Reviews, long text$7.60$8.56−$0.96
Orders with line items$7.94$9.17−$1.23
Total$87.99$112.50−$24.51

What it shows

  • o200k_base: Terset, rules line included, is under TOON's best in 11 of 11 cases and under compact JSON in 9 of 11.
  • o200k_base: Over all 11 cases, Terset totals 43,995 tokens: 21.8% fewer than JSON compact (56,248), 42.9% fewer than JSON pretty (77,071), 32.3% fewer than YAML (65,009), and 7.9% fewer than TOON's best (47,753).
  • Claude: Terset, rules line included, is under TOON's best in 6 of 11 cases and under compact JSON in 9 of 11.
  • Claude: Over all 11 cases, Terset totals 64,467 tokens: 24.8% fewer than JSON compact (85,717), 39.5% fewer than JSON pretty (106,601), 26.7% fewer than YAML (87,945), and 4.1% fewer than TOON's best (67,220).
  • Token counts say nothing about answer quality. Terset is about fewer tokens.

When to keep something else

  • o200k_base: Compact JSON wins on deep nested config (371 vs 411) and mixed-type array (85 vs 125). These have no list of records, so Terset writes JSON and the rules line is pure cost.
  • Claude: Compact JSON wins on deep nested config (610 vs 682) and mixed-type array (114 vs 189). These have no list of records, so Terset writes JSON and the rules line is pure cost.
  • Claude: TOON's best is smaller than or equal to Terset in 5 of 11 cases: UI text, uniform rows (1,098 vs 1,126); Deep nested config (602 vs 682); Mixed-type array (189 vs 189); Reviews, long text (5,149 vs 5,177); Orders with line items (5,691 vs 5,734).
  • o200k_base: Plain CSV is 30 to 40 tokens smaller on 4 flat, uniform lists, because it needs no rules line. It has no types, it merges null, absent and empty text, and it cannot hold nesting. On orders with line items it is larger: 4,952 vs 3,968.
  • Claude: Plain CSV is 35 to 77 tokens smaller on 4 flat, uniform lists, because it needs no rules line. It has no types, it merges null, absent and empty text, and it cannot hold nesting. On orders with line items it is larger: 6,741 vs 5,734.

Method

  • The o200k_base counts use the o200k_base tokenizer, run locally.
  • The Claude counts come from Anthropic's token count endpoint for claude-opus-5-5, run on 2026-11-12 UTC.
  • Each text is sent as one user message. The same run also counts the one-letter text "a", which comes back as 9 tokens. Its 8 tokens of fixed message framing are taken off every count, assuming "a" itself is 1 token.
  • Terset is sent as the RULES line, a newline and the data, in one message, so its Claude counts include the rules line.
  • Every Claude case was made from the same input as the o200k_base case of the same name. The build checks this by comparing the compact JSON counted locally with o200k_base.
  • Every format gets the same input, root arrays included.
  • JSON compact is JSON.stringify(value), with no spaces and no line breaks. It is the main baseline: every headline percentage is against it.
  • JSON pretty is JSON.stringify(value, null, 2), with a 2-space indent.
  • YAML is the yaml package, version 2.9.1, stringify with default options.
  • TOON is the smaller of its comma and tab forms for each case.
  • CSV is plain comma CSV for data that is one list of records, and n/a otherwise. Each CSV is read back and checked; lossy means it did not come back as the same typed data.
  • Terset counts include the RULES line, 40 o200k_base tokens, once per prompt.
  • Each Terset output is decoded and compared with its input, after UTF-8 transport, before it is counted.

Cost method

  • Cost is the input tokens of one request times the list price, shown per 1,000 requests of that case. It is input only: no output tokens, no caching and no discounts. It is not a bill.
  • Claude Opus 5.5 is $4 per million input tokens (pricing). It is applied to the Claude counts.
  • GPT 6.1 Sol is $2 per million input tokens, context up to 272K (pricing). It is applied to the o200k_base counts. Those are tokenizer counts, not counts reported for that model, so the GPT 6.1 Sol figure assumes that tokenizer.
  • Both pricing pages were read on 2026-11-12.

Limits

  • Token counts are for two counters. Other tokenizers and models will give other counts.
  • Token counts say nothing about answer quality. Terset is about fewer tokens.
  • Fewer tokens is not proof of lower cost or faster replies on every model.
  • Cost figures are input tokens at list price on the day the prices were read. Prices change.
  • Gzipped: Terset encode 1.2 kB, encode plus decode 2.1 kB. TOON 4.4.0 encode 2.8 kB, encode plus decode 8.2 kB. No dependencies.