All tools run in your browser — your files never leave your device.
All tools154

Utilities & Converters

JSON to CSV Converter

JSON to CSV and back, with nested objects flattened.

What it does. JSON is a tree; CSV is a grid. Converting means flattening — nested objects become dotted column names like <code>address.city</code>, and arrays either expand into numbered columns or collapse to a joined string. That flattening is lossy in one direction, which is why the round trip does not always return what you started with.
Runs in your browserNothing uploadsNo signupWorks offline

How to use JSON to CSV Converter

  1. Paste a JSON array of objects.
  2. Choose the delimiter and how to handle nesting.
  3. Copy or download the CSV — or paste CSV to go the other way.

Why the round trip is not symmetric

CSV has exactly one type: text. Convert JSON to CSV and every number, boolean and null becomes a string; convert back and the parser has to guess which strings were numbers.

Usually it guesses right. It reliably guesses wrong on things like postcodes, phone numbers and IDs with leading zeros, which look numeric and are not.

If the data will make a round trip, quote the columns that must stay text and use a parser setting that respects quoting rather than inferring types. This is the same failure that strips leading zeros from spreadsheet imports.

The quoting rules that matter

  • A field containing the delimiter must be quoted.
  • A field containing a newline must be quoted — and yes, CSV records can span lines.
  • A quote inside a quoted field is escaped by doubling it, not with a backslash.
  • Leading and trailing spaces are significant inside quotes and usually trimmed outside them.

Hand-written CSV writers get the doubled-quote rule wrong more than any other. A field containing 5" pipe written with a backslash escape produces a file that opens wrong in every spreadsheet.

Nesting has no good answer

A CSV column cannot hold a structure, so nested data has to be flattened, joined or dropped. Dotted column names are the least bad option and are what most tools use.

Arrays are worse: three tags in one record become either three columns, a semicolon-joined string, or three rows depending on what you want, and none of those is obviously correct.

If the data is genuinely nested and the destination genuinely needs the structure, CSV is the wrong format. Converting anyway produces something that opens in Excel and has lost the shape it needed.

Frequently asked questions

Why did my leading zeros disappear?

CSV has only one type — text — so a converter or spreadsheet infers types on the way back and reads 00123 as the number 123. Quote those columns and import them as text.

How are nested objects handled?

Flattened into dotted column names, so address.city becomes a column. Arrays are either expanded into numbered columns or joined into one string, and neither is obviously right.

How do I escape a quote inside a CSV field?

By doubling it, not with a backslash. A quoted field containing a quote is written as "" — the backslash convention is the most common hand-written CSV bug.

Can a CSV field contain a newline?

Yes, if the field is quoted. Records legitimately span multiple lines, which is why splitting a CSV on newlines to parse it is unreliable.

Is my data uploaded?

No. Conversion runs in your browser, which matters because JSON pasted into a converter is very often an API response containing real records.