elefcode

JSON ↔ CSV Converter

Convert JSON arrays to CSV and back — nested objects, Excel files and leading zeros handled properly.

CSV2 rows × 6 columns

Advertisement

Guide

About the JSON ↔ CSV Converter

JSON and CSV are the two most common ways to move tabular data around. CSV is what spreadsheets, databases, and analysts expect — rows and columns of plain text. JSON is what APIs and applications speak. This tool converts a JSON array of objects into CSV, and parses CSV back into JSON, so you can move data between the two worlds without hand-editing.

It follows proper CSV quoting rules (so values containing commas, quotes, or newlines survive round-trips), lets you pick the delimiter, and coerces numbers and booleans when reading CSV back to JSON. Everything runs locally in your browser.

How the conversion maps data

Going JSON → CSV, each object becomes a row and the union of all keys becomes the header, so even records with missing fields line up correctly. Going CSV → JSON, the first row is treated as the header and each subsequent row becomes an object. Because CSV has no types, the parser coerces obvious numbers and true/false values so the JSON is useful straight away.

Why quoting rules matter

A naive CSV export breaks the moment a value contains a comma or a line break. This converter follows the RFC 4180 convention: fields with commas, quotes, or newlines are wrapped in double quotes, and embedded quotes are doubled. That means your data survives a full round-trip through spreadsheets and back without corruption.

How to use it

  1. 1Choose the direction: JSON → CSV or CSV → JSON.
  2. 2Paste a JSON array of objects, or CSV with a header row.
  3. 3Pick the delimiter if you need something other than a comma.
  4. 4Copy the converted output into your spreadsheet, database, or app.

Frequently asked questions

What JSON shape does it expect?

An array of objects, where each object is one row and its keys are the columns. The header is built from the combined set of keys across all objects.

Does it handle values with commas or quotes?

Yes. It follows RFC 4180 quoting, wrapping fields that contain commas, quotes, or newlines in double quotes and escaping embedded quotes, so data survives round-trips.

Can I use a semicolon or tab delimiter?

Yes. You can choose the delimiter, which is useful for European CSVs that use semicolons or for tab-separated values.

Are numbers kept as numbers when converting CSV to JSON?

Yes, with “Detect numbers & booleans” on — except values with leading zeros like 02134 or 007, and integers too long for JavaScript, which stay text so nothing is lost.

Why does my CSV look garbled in Excel?

Excel assumes an old encoding unless a UTF-8 file starts with a byte-order mark. The Excel-ready download adds one, so accents and non-Latin text display correctly. Files saved by Excel that start with one are read correctly too.

What happens to nested objects?

With Flatten on, { address: { city } } becomes an address.city column. Converting back, a.b columns are rebuilt into nested objects.

Is my data uploaded?

No. Conversion runs entirely in your browser, so your data never leaves your device.

Learn more

Related tools