JSON, YAML, or CSV: pick the right container
Three formats, three jobs. When each one shines, when each one bites, and why "it depends" has an actual answer.
By Noble Erne, LLC · 5 min read · Reviewed July 2026
These three formats get treated as interchangeable because converters exist (there's one on this page). They're not. Each was shaped by a different job, and using the wrong one is a slow leak of small annoyances.
JSON is the format of machines talking to machines. Strict syntax, real types, universal parser support — every API speaks it. Its weaknesses are human ones: no comments, unforgiving punctuation, and deep nesting that's miserable to read. If software writes it and software reads it, JSON.
YAML: configs humans maintain
YAML is JSON's superset optimized for human eyes: indentation instead of braces, comments allowed, less punctuation noise. That's why Kubernetes, CI pipelines, and Docker Compose all chose it — config files are read and edited by people far more often than they're parsed. The cost is a parser full of clever guesses that occasionally guess wrong (see our Norway problem guide). Rule: YAML for files humans edit, never for data machines exchange.
CSV: tables, and nothing but tables
CSV is older than both and will outlive both, because it does one thing with zero ceremony: rows and columns as plain text. Every spreadsheet, database, and data tool imports it. It has no types, no nesting, no standard worth the name — but when the data IS a table and a human needs it in Excel, CSV is the answer and everything else is friction.
The conversion flow on this page reflects real life: APIs hand you JSON, your finance person wants CSV, your deployment wants YAML. Same data, three costumes — just know which room each costume belongs in.
Published by Noble Erne, LLC. Enterprise systems consultant with a background in SAP implementation, software documentation, and instructional design. Builds the tools and writes the explainers on this site. Corrections to this guide go to the contact page and are reviewed before publication.
Related guides
- The Norway problem: when YAML says no
A country code that becomes false, versions that lose their zeros, and the YAML type-guessing that has broken real deployments. - Regex: the 20% that solves 80% of problems
You don’t need to master regular expressions. You need about twelve pieces of syntax, the greediness trap, and a tester. Here’s the kit. - Unix time: the number that runs everything
Why computers count seconds since 1970, what happens in 2038, and the seconds-vs-milliseconds bug every developer ships once.