~/frontend-tools/json-yaml-csv-converter
JSON, YAML and CSV Converter
Convert data between JSON, YAML and CSV in any direction. Nested objects are flattened into dotted column names for CSV and rebuilt when converting back, values with commas or quotes are escaped correctly, and invalid input gets a clear error message.
Using the JSON / YAML / CSV Converter
Choosing a format
JSON is the language of APIs and JavaScript. YAML is easier for people to read and write, which is why configuration files for tools like GitHub Actions and Docker Compose use it. CSV is the format spreadsheets understand, ideal for product lists and exports.
CSV and nested data
CSV is flat: rows and columns. Converting nested JSON flattens each object into dotted column names, so stock.warehouse becomes its own column. Converting that CSV back to JSON rebuilds the nested objects from the dots. Arrays inside records are stored as JSON text in a single cell.
Quoting and delimiters
Values containing the delimiter, quotes or line breaks are wrapped in double quotes and inner quotes doubled, following the common CSV convention (RFC 4180) that Excel and Google Sheets use. Choose semicolon for locales where Excel expects it.
Types and YAML
CSV has no types, so numbers and true or false values are detected when converting from CSV. YAML parsing and output use the widely used js-yaml library, loaded from a public CDN, and run in your browser like everything else.
Frequently asked questions
Why does JSON to CSV need an array?
Each CSV row is one record, so the JSON must be an array of objects, or a single object, which becomes one row.
Are YAML comments kept?
No. Comments are not part of the data and are lost when converting.
Is my data uploaded?
No. Only the js-yaml library is downloaded; your data never leaves your browser.