Developer Tools

JSON to CSV Converter

Turn an array of flat objects into CSV, and stop when a nested value would have to be dropped.

JSON to CSV Converter workspace

How to use it

Paste a JSON array of objects whose values are strings, numbers, booleans, or null. Convert builds the CSV. Nested objects and arrays are refused instead of being silently flattened.

Example

Two flat objects become a header row and two data rows.

Input

[{"name":"Ada","year":1815},{"name":"Grace","year":1906}]

Result

name,year
Ada,1815
Grace,1906

How it works

The converter reads the JSON, collects field names in first-seen order, and writes an RFC-style CSV. Missing fields become empty cells. A single flat object is accepted as one row. An array of scalars becomes one column named value.

Common errors

  • Nested address object Remove the nested object or export that branch on its own. The tool will name the field it refused.
  • The root value is a number Wrap rows in an array or provide one flat object.
  • Excel shows the wrong characters Turn on the Excel BOM option so Excel recognizes UTF-8.

Limitations

Nested data is not flattened, because flattening can hide information. Very large integers can lose precision in JSON itself. The BOM option only adds a byte-order mark. It does not change the rows.

Privacy

The text you paste is processed in your browser. PepsTools does not receive it, store it, or send it to another service.

Questions

Will nested fields be joined with dots?

No. If a value is an object or array, conversion stops and names the field.