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.
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
| Case | Terset | JSON compact | JSON pretty | YAML | TOON best | CSV | vs JSON compact | vs TOON |
|---|---|---|---|---|---|---|---|---|
| UI text, uneven rows | 504 | 695 | 1,190 | 802 | 846 | 473 lossy | −27.5% | −40.4% |
| UI text, uniform rows | 534 | 742 | 1,261 | 857 | 539 | 504 | −28.0% | −0.9% |
| Translation batch | 1,225 | 1,450 | 2,396 | 1,623 | 1,660 | 1,402 lossy | −15.5% | −26.2% |
| File list, short | 9,657 | 12,806 | 16,771 | 14,453 | 10,643 | n/a | −24.6% | −9.3% |
| File list, long | 16,483 | 19,627 | 23,595 | 22,129 | 17,476 | n/a | −16.0% | −5.7% |
| 200 users | 4,718 | 6,811 | 10,610 | 7,983 | 5,081 | 4,678 | −30.7% | −7.1% |
| Metrics, numbers and booleans | 2,569 | 4,797 | 7,557 | 6,115 | 2,654 | 2,531 | −46.4% | −3.2% |
| Deep nested config | 411 | 371 | 653 | 456 | 442 | n/a | +10.8% | −7.0% |
| Mixed-type array | 125 | 85 | 170 | 131 | 160 | n/a | +47.1% | −21.9% |
| Reviews, long text | 3,801 | 4,279 | 5,119 | 4,787 | 3,833 | 3,769 | −11.2% | −0.8% |
| Orders with line items | 3,968 | 4,585 | 7,749 | 5,673 | 4,419 | 4,952 lossy | −13.5% | −10.2% |
| Total | 43,995 | 56,248 | 77,071 | 65,009 | 47,753 | n/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.
| Case | Terset | JSON compact | vs 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_basetokenizer, 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
yamlpackage, version 2.9.1,stringifywith 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_basecounts. 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.