Skip to content
devtoolbox.cc

JSON ↔ YAML ↔ CSV Converter

Convert JSON to YAML or CSV and back. Lossless numbers, YAML 1.1-safe quoting, nested fields flattened to columns, Excel-friendly CSV.

Runs locally in your browser

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: no stays the string "no" instead of turning into false (the “Norway problem”).
  • When writing YAML, strings like yes, on, 010 or 2024-01-01 are 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 9007199254740993 and spellings such as 1.0 are kept exactly.
  • Comments and custom tags such as CloudFormation’s !Ref cannot 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.city and tags.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 means null; "" 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.