Reference

Data Formats

Choosing a format is a set of trade-offs, and most conversion problems come from a mismatch between what one format can express and what the next one can. These pages set out what each format does well, what it cannot do, and what that means when converting.

JSON

23 tools

The default interchange format for APIs and configuration.

JSON won as the interchange format for web APIs because it is simple enough to parse with confidence and maps directly onto the data structures every language already has: objects, arrays, strings, numbers, booleans and null. There is very little to argue about in a JSON document.

JSON tools

YAML

8 tools

A human-readable configuration format that is a superset of JSON.

YAML exists to be written and read by people. It has comments, it needs no brackets or quotes for ordinary values, and indentation carries the structure, which is why it became the default for Kubernetes manifests, CI pipelines and application configuration.

YAML tools

CSV

18 tools

Tabular plain text, universally supported and full of edge cases.

CSV is the format every spreadsheet, database and analytics tool can read, which is why data keeps arriving in it. It is a row per line and fields separated by commas, until a field contains a comma, a quote or a newline, at which point the quoting rules of RFC 4180 apply and naive parsing breaks.

CSV tools

XML

6 tools

A verbose, highly expressive markup format still central to enterprise systems.

XML is more expressive than JSON in ways that matter for documents: it distinguishes attributes from child elements, supports namespaces so two vocabularies can coexist in one file, preserves the order of mixed text and elements, and has mature schema languages for validation.

XML tools

TOML

4 tools

A configuration format designed to be obvious to read.

TOML was designed for configuration specifically, aiming to be unambiguous where YAML is flexible. Sections are explicit rather than indentation-based, so a misplaced space cannot silently change the structure, which is why Rust, Python packaging and many Go projects adopted it.

TOML tools

SQL

5 tools

The query language, with enough dialect variation to matter.

SQL is not one language. PostgreSQL, MySQL, SQL Server, Oracle and BigQuery differ in their quoting characters, their functions, their casting syntax and their extensions. Formatting SQL well means knowing which dialect it is, because otherwise vendor syntax is treated as opaque text.

SQL tools

HTML

6 tools

The markup language of the web, where whitespace sometimes matters.

HTML is forgiving by design, browsers recover from unclosed tags and malformed markup rather than refusing to render. That tolerance makes it pleasant to write and awkward to process, because there is no single correct parse of a broken document.

HTML tools

Markdown

6 tools

Lightweight markup that reads as plain text.

Markdown succeeded because its source is readable without being rendered. A heading looks like a heading, a list looks like a list, and emphasis is visible as asterisks. That is why it became the format for READMEs, documentation and issue trackers.

Markdown tools

CSS

5 tools

Stylesheets, plus the colour and unit maths that goes with them.

CSS is simple to tokenise and full of context that a naive tool gets wrong. A colon separates a property from its value, except inside a url(), a data URI or a media feature, where it means something else. Minifying or formatting without tracking that context breaks values silently.

CSS tools

Base64

2 tools

Binary-safe text encoding, not encryption.

Base64 rewrites arbitrary bytes using 64 characters that survive any text channel, at a cost of roughly 33% size growth. It is how binary data travels inside JSON strings, email bodies, data URIs and HTML attributes.

Base64 tools