JSON
JSON (JavaScript Object Notation) is the most widely used data serialization format on the web. It is lightweight, human-readable, and natively supported in JavaScript, with mature parsers in every other language. JSON supports strings, numbers, booleans, arrays, objects, and null, and is the default interchange format for REST and GraphQL APIs. Because it is so widely supported, JSON is the safest default when you need to exchange data between different systems or store structured documents in a database.
YAML
YAML (YAML Ain't Markup Language) prioritizes human readability, using indentation-based structure instead of braces and brackets. It is the standard for configuration files in Docker, Kubernetes, CI/CD pipelines, and most modern tooling, and it supports comments, multi-line strings, anchors, and complex nested data types. Its readability is its greatest strength, but it also introduces subtle pitfalls such as significant whitespace, ambiguity around strings that look like booleans or numbers, and inconsistent support for some features across parsers. Validate YAML carefully before it is consumed by critical infrastructure.
TOML
TOML (Tom's Obvious Minimal Language) is designed specifically for configuration files, with an emphasis on clarity and unambiguity. It uses INI-like section headers in square brackets, supports tables, arrays of tables, and standard data types, and its parsing rules are precise enough to avoid the ambiguity found in YAML. It is the configuration format used by Rust's Cargo, Python's pyproject.toml, and many Go projects. For simple, human-editable configuration where predictability matters, TOML is often the best choice.
XML
XML (eXtensible Markup Language) is a verbose but powerful format that supports custom schemas, namespaces, attributes, and mixed content. It is still widely used in enterprise systems, SOAP APIs, document storage, and interchange standards such as RSS and SVG. XML's strictness and rich validation options make it valuable when data correctness and schema enforcement are critical. However, its verbosity makes it cumbersome for everyday API use, which is why most modern services prefer JSON or YAML.