webutilkit

JSON ↔ CSV Converter

Convert a JSON array of objects to CSV, or CSV back to JSON, entirely in your browser.

CSV

How it works

Converting to CSV collects every column name across all objects, then writes one header row followed by one row per object, quoting a value whenever it contains a comma, quote, or newline. Converting back parses the CSV character by character rather than line by line, so a quoted field spanning multiple lines is not mistaken for multiple rows.

Handling uneven rows

If some objects are missing a key that others have, the resulting CSV still gets one column for it — rows without that key just get an empty cell rather than the whole conversion failing.

Limitations

This expects a flat array of objects. Nested objects or arrays inside a row are converted to their JSON text representation rather than being split into further columns, since CSV has no native way to represent nested structure.

Frequently asked questions

What JSON shape does this expect?

An array of flat objects, like [{"name":"Ada","age":36}]. Columns are collected from every object’s keys, so rows with different keys still convert — missing values become empty cells.

Does the CSV parser handle quoted fields correctly?

Yes, including fields containing commas, double quotes, or embedded newlines, following the common CSV quoting convention of doubling a quote to escape it.