About the JSON ↔ YAML ↔ CSV converter
Convert between JSON, YAML and CSV in any direction, or reformat a file in the same format (for example, to change a CSV delimiter). Conversion is live and happens entirely in your browser.
JSON and YAML
- YAML is read with the YAML 1.2 rules, so
country: nostays the string"no"instead of turning intofalse(the “Norway problem”). - When writing YAML, strings like
yes,on,010or2024-01-01are quoted, so older YAML 1.1 tools (PyYAML, Go, many CI systems) read them back exactly. - Anchors, aliases and
<<merge keys (docker-compose, GitLab CI) are expanded. Multiple documents (---) become a JSON array. - Large integers such as
9007199254740993and spellings such as1.0are kept exactly. - Comments and custom tags such as CloudFormation’s
!Refcannot be represented in JSON. You get a notice when they are dropped.
JSON and CSV
- An array of objects becomes one row per object, with columns from all keys.
- Nested fields are flattened into columns like
address.cityandtags.0, and rebuilt when converting back. Alternatively, keep them as JSON text in a single cell. - Values that look like numbers but are strings (
"007","123") are quoted, so they stay strings on the way back. An empty field meansnull;""means an empty string. - The delimiter (comma, semicolon, tab or pipe) is detected automatically when reading.
- Use Add BOM for Excel so Excel opens UTF-8 files (Cyrillic, accents, emoji) correctly. Turn on Escape formulas when a spreadsheet will be opened by others, to prevent CSV formula injection.
Header names that themselves contain a dot are split into nested objects when reading. Turn off Unflatten to keep them as they are.