Australian Jeevitham TECHDeveloper tools

Tech / JSON ⇄ CSV / YAML Converter

JSON ⇄ CSV / YAML

Convert between JSON, CSV and YAML in either direction. Nested objects become dotted column names in CSV. Nothing leaves your browser.

JSON, CSV and YAML compared

FormatUsed forGood to know
JSONWeb APIs and appsHandles nested data and lists
CSVSpreadsheets such as Excel and Google SheetsFlat rows and columns only
YAMLConfiguration files, such as Docker Compose, Kubernetes and GitHub ActionsEasy to read, but the indentation matters

How nested data becomes CSV

CSV has no nesting, so this page flattens nested objects into dotted column names. This JSON:

[{"name":"Anu","address":{"city":"Brisbane","postcode":"4000"},"skills":["nursing","IELTS"]}]

becomes the columns name, address.city, address.postcode and skills. The list of skills is kept as JSON text in one cell, so no data is lost.

Opening a CSV in Excel

Excel can change some values when it opens a CSV: it drops the leading zero from phone numbers such as 0412 345 678, and shows long ID numbers in scientific notation. To keep them exactly, import the file with Excel's data import and set those columns to Text. If your Excel expects semicolons, choose the semicolon separator above.

Common YAML mistakes

  • Indent with spaces, never tabs.
  • Put quotes around values that could be misread, such as "yes", "no", "08" or a postcode with a leading zero.

Your data is converted in your browser and is not uploaded.