What shape of JSON converts well

The best input is an array of objects, where every object describes one row and every key is a column. For example, a list of customers with name, city, and age keys becomes a table with three columns.

If the objects do not all have the same keys, a good converter builds the column list from every key it finds and leaves missing cells empty, so no data is dropped.

Commas, quotes and line breaks

CSV uses commas to separate columns, so a value that contains a comma must be wrapped in double quotes. A double quote inside a value is written as two double quotes. A value with a line break must also be quoted.

These rules come from the CSV standard (RFC 4180). If a file looks broken in a spreadsheet, a missing quote is the usual cause.

Nested objects and arrays

CSV is flat, but JSON can nest objects and lists inside each other. The safest simple approach is to keep a nested value in its cell as JSON text, so it can be restored later. Another approach is to flatten keys, for example address.city, which is easier to read but needs a matching rule to rebuild the original structure.

Choosing a separator

In some regions spreadsheets expect a semicolon instead of a comma, because the comma is used as the decimal mark. If Excel puts everything into one column, try a semicolon or a tab separator.

Spreadsheet formula injection

A spreadsheet can run a cell that starts with =, +, - or @ as a formula. If your JSON comes from people you do not know, a cell like =HYPERLINK(...) can cause trouble when the file is opened. Prefixing such text cells with an apostrophe keeps them as plain text. The ToolWorkIt converter has an option for this.

Try it

Use the JSON to CSV Converter to convert both ways in your browser. Your data is not uploaded.

Common questions

Frequently asked questions

Can I convert CSV back to JSON?

Yes. With a header row, each row becomes an object. You can also turn numbers and true or false into real JSON types.

Why does Excel show everything in one column?

Your region probably expects a different separator. Try a semicolon or tab.

Is my data uploaded?

Not with the ToolWorkIt converter. It runs entirely in your browser.

Keep reading

More guides