Code Beautify / MULTIVERTO

JSON to CSV

Turn a flat JSON object array into CSV rows.

Live converterYour input stays in this browser. No text is uploaded for conversion.

The file stays in your browser.
Chain tools

Apply each text tool to the previous result. Text workflows ↗

Only the recipe name and tool order are saved in this browser. Your input and results are never saved.

01 / Example

Example

Your input[{"name":"Ada","city":"Hello"},{"name":"Lin","city":"Welcome"}]
Resultname,city Ada,Hello Lin,Welcome

02 / Guide

JSON to CSV — How it works

What changes in this tool

For records [{"id":"0012","qty":2}], the CSV header is id,qty and the data row is 0012,2. CSV stores cell text rather than JSON types, so a spreadsheet may turn the identifier 0012 into 12 unless that column is imported as text. A value beginning with an equals sign may also be treated as a formula by a spreadsheet; inspect and constrain untrusted data before opening it. This tool quotes commas and line breaks correctly but cannot dictate the receiver's type or security policy.

Know the format

JSON-to-CSV accepts a nonempty array of flat objects and gathers their keys into columns. Missing or null values become empty cells, so a reverse conversion cannot distinguish them without an external schema.

A dependable workflow

Provide a nonempty JSON array of flat objects. The converter collects property names in their first-seen order and writes them as a common CSV header; each object then fills the matching columns. A missing property or null becomes an empty cell, so the table alone cannot distinguish those cases later. Nested objects and arrays are refused rather than serialized into an ambiguous cell. Examine an object with an absent field and a text value containing a comma or line break before exporting many rows. The writer quotes cells as CSV requires, but it does not infer a spreadsheet’s local delimiter or preserve JSON type annotations in the cells. In the live example, with line breaks shown as JSON escapes, input "[{\"name\":\"Ada\",\"city\":\"Hello\"},{\"name\":\"Lin\",\"city\":\"Welcome\"}]" produces output "name,city\r\nAda,Hello\r\nLin,Welcome". Give the JSON records different property sets and put a comma in one string value. Check the CSV header and the field at the missing property before importing. Blank cells can mean absent data, empty string or an application-specific null, so select a receiving convention explicitly.

Check the result

Export a nonempty array of flat records to a spreadsheet-friendly CSV file. Look at the header order and at a row missing a field; commas, quotes and newlines inside cells require quoting. The operation rejects nested arrays and objects rather than inventing a serialization. When importing elsewhere, set the receiver’s encoding and column-type rules explicitly. Reopen the output with a CSV parser and compare row count, header order and each column with the source objects. Values arrive as cell text, even when their JSON source was numeric or boolean; the importer must apply types explicitly. A blank field may represent null, a missing property or an empty string, so decide whether this loss of distinction is acceptable for the destination. Test a quoted comma and a multiline cell if they occur in real data. Avoid treating a spreadsheet preview as the sole validation, since its automatic date and formula rules can alter imported content.

How this conversion transforms the input
JSON — Input
Read and transform structure
CSV — Result

Explore guides

Conversion guides

Explore guides