PulseAugur
EN
LIVE 21:53:34
Español(ES) Conté los tokens de los mismos datos en 7 formatos: el JSON con sangría cuesta 3 veces más que el CSV

Pretty JSON uses 3x more tokens than CSV in LLM prompts, analysis finds

A recent analysis compared the token usage of seven data formats when used in LLM prompts, finding that pretty-printed JSON consumes approximately three times more tokens than CSV. This difference is attributed to repeated keys, punctuation, and unnecessary indentation, which add to the token count without benefiting the model. The study suggests using CSV or TSV for simple tabular data, minified JSON for structured output, and Markdown for human-readable tables, while advising against pretty-printed JSON and XML in prompts to optimize costs. AI

IMPACT Optimizing prompt formatting can significantly reduce LLM operational costs and improve efficiency.

RANK_REASON Analysis of data format token efficiency for LLM prompts.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 3 sources. How we write summaries →

Pretty JSON uses 3x more tokens than CSV in LLM prompts, analysis finds

How we ranked this

Signal score
2 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Research
Analysis of data format token efficiency for LLM prompts.
Source corroboration
3 independent sources
Multiple independent publishers reporting the same story raises confidence that it's real and newsworthy.
Topics
infra
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
1 days old
Coverage has settled into its steady-state source set.

Full methodology in our editorial standards.

COVERAGE [3]

  1. dev.to — LLM tag TIER_1 Português(PT) · Johmisking ·

    I counted the tokens of the same data in 7 formats: indented JSON costs 3x more than CSV

    <p>A maioria de nós cola dados no prompt como JSON, muitas vezes direto do <code>JSON.stringify(data, null, 2)</code>. Eu nunca tinha medido quantos tokens isso custa, então peguei uma tabela, escrevi em sete formatos e contei.</p> <p>Resumo: <strong>JSON com indentação usa cerca…

  2. dev.to — LLM tag TIER_1 Español(ES) · Johmisking ·

    I counted the tokens of the same data in 7 formats: indented JSON costs 3 times more than CSV

    <p>Casi todos pegamos datos en los prompts como JSON, muchas veces directo de <code>JSON.stringify(data, null, 2)</code>. Nunca había medido cuántos tokens cuesta eso, así que tomé una tabla, la escribí en siete formatos y conté.</p> <p>Resumen: <strong>el JSON con sangría usa un…

  3. dev.to — LLM tag TIER_1 English(EN) · Johmisking ·

    I counted tokens for the same data in 7 formats. Pretty JSON costs 3 CSV

    <p>Most of us paste data into LLM prompts as JSON, often straight from <code>JSON.stringify(data, null, 2)</code>. I had never checked what that costs in tokens, so I took one table, wrote it in seven formats and counted.</p> <p>Short version: <strong>pretty-printed JSON uses abo…