JSON to CSV Converter

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

Runs entirely in your browser — nothing is sent to our servers.

How to use it
  1. Choose a direction: JSON → CSV or CSV → JSON.
  2. Paste your data on the left — a small sample is preloaded to try it out.
  3. Read the converted result on the right, or the error if the input isn't valid.
  4. Copy the result with the button above the output panel.

Input (JSON)

Output (CSV)

id,name,role
1,Ada Lovelace,Engineer
2,Grace Hopper,Engineer

What is JSON to CSV conversion?

JSON is the shape APIs return; CSV is the shape spreadsheets and data-import tools want. Converting a JSON array of objects to CSV means picking a column for every key that appears anywhere in the array, and lining every object's values up under the right column — even if some objects are missing a field. Converting back means treating the first CSV row as headers and reading every value as a typed field.

The two formats aren't a clean round trip by nature — JSON has real nesting, arrays, booleans and null, while CSV is fundamentally a flat grid of text. Every JSON → CSV converter has to make a call about what happens to a nested object or array inside a field, and every CSV → JSON converter has to guess a type from a plain string. Knowing how this tool makes those calls matters more than the mechanics of the conversion itself.

Why use this tool

Both directions happen locally: no file uploads to a third-party converter, which matters when the data is a real export containing customer records. JSON → CSV collects the union of every object's keys as columns, quotes fields containing commas, quotes or newlines per RFC 4180, and serializes nested objects/arrays as inline JSON strings in their cell rather than silently dropping them or flattening them into columns you didn't ask for. CSV → JSON coerces numbers and true/false automatically, and everything else stays a string.

A common use is turning an API response into something a non-technical teammate can open in a spreadsheet — pulling a JSON array of user records or event logs and handing over a CSV instead of asking them to read JSON. The reverse direction shows up just as often: a CSV exported from a spreadsheet or another tool needs to become a JSON array to seed a test fixture, feed a script, or POST to an API that only accepts JSON bodies.

Common conversion gotchas

Mismatched keys across rows

Mismatched keys across objects are the most frequent surprise: if only one row in a hundred has an email field, that row still gets its own email column, and every other row gets a blank cell there rather than the column being dropped. That's usually what you want, but it means a single outlier record can add a column that looks empty for everything else — worth checking for before assuming your data export is missing a field.

Why did my leading zeros disappear?

Leading zeros are the classic CSV trap, and it happens after this tool, not during it: opening a converted CSV in Excel or Google Sheets, a value like "00042" gets auto-detected as the number 42 and silently loses its leading zeros the moment the file opens, even though the CSV text itself is correct. IDs, ZIP codes and phone numbers that carry meaningful leading zeros need to be treated as text on the spreadsheet side (or re-quoted) after conversion, not before.

Dates get reformatted by the spreadsheet, not by this tool

Dates have the same problem in reverse: a spreadsheet application will often reformat an ISO date string like 2026-03-05 into its own locale's date format the instant a CSV is opened, which is a spreadsheet-application behavior, not something this converter does — the JSON → CSV output preserves your date strings exactly as written.

JSON to CSV converter FAQ

No. Conversion in both directions runs entirely in your browser.

An array of flat objects, or a single object (treated as a one-row array). Deeply nested values are serialized as inline JSON strings in their cell rather than expanded into extra columns.

The CSV columns are the union of every key seen across all objects; missing fields are left blank for that row.

Numeric-looking values become numbers, "true"/"false" become booleans, and everything else stays a string. Quote a value in the CSV if you need it to stay a string, e.g. a numeric ID.

Yes, both directions follow RFC 4180 quoting rules.

That happens when the CSV is later opened in Excel or Sheets, which auto-detects numeric-looking text and strips leading zeros — the CSV text itself is unaffected. Format that column as text in the spreadsheet after opening, or keep the value quoted with a non-numeric character if it must survive as-is.