Skip to content
PrivateDevTools

JSON to CSV without unexpected data loss

Work through nested JSON, dotted CSV columns, leading zeros and empty values before moving data into a spreadsheet.

Data formats Published October 21, 2026

Start by deciding what a row represents

JSON can describe a tree; CSV describes rows and columns. Before converting, choose the record that should become one row. For a customer export, that might be each customer. For an order report, it might be each order. Those decisions affect how useful the resulting spreadsheet will be.

The PrivateDevTools converter treats a top-level array as rows. An object usually becomes one row; an object whose only value is an array uses that array as the row list. If your document contains unrelated metadata, copy the record array into the input first.

A worked example: nested objects and arrays

JSON input
[
  { "id": "00123", "customer": { "name": "Ada" }, "tags": ["pro", "beta"] },
  { "id": "00456", "customer": { "name": "Grace" }, "tags": ["team", "stable"] }
]

The converter flattens nested properties into dotted headers. Array positions become numeric path segments:

CSV output
id,customer.name,tags.0,tags.1
00123,Ada,pro,beta
00456,Grace,team,stable

This gives you one customer per row. It does not create a separate row for every tag. If you need a tag report, reshape the JSON into one object per customer-tag pair before conversion.

Check the values CSV cannot describe precisely

CSV cells do not carry a JSON type. The converter recognizes some numbers and booleans when reading CSV, while keeping leading-zero values such as 00123 as text. A spreadsheet application may make its own type decisions, so import identifier columns as text there too.

Null, missing properties and empty strings can become indistinguishable after a round trip. Empty objects and arrays also need care. Dots in original property names can be confused with the dotted nesting convention. Keep the source JSON when those distinctions matter.

Before using the export

Convert the CSV back with the CSV to JSON tool, then compare a representative record with the original. Check row count, identifiers, empty values and array positions. A successful parse means the syntax worked; it does not prove that the shape is right for your report.

Delimiter quoting is handled by the parser, but it is separate from spreadsheet formula safety. Inspect untrusted cell contents before opening a CSV in software that evaluates formulas. The parser’s CSV export documentation explains its quoting and formula-escaping options; this converter does not currently enable formula escaping.

Try the example locallyOpen the JSON to CSV converter