JSON to CSV Converter guide

How to Convert JSON to CSV Safely

The JSON to CSV Converter turns one JSON object or an array of objects into a rectangular CSV table. It is useful for small API responses, exports, and test data that you want to inspect in a spreadsheet without uploading the content. Start with the shape of the JSON. One object becomes one row. An array of objects becomes several rows. Nested objects become dot-notation columns, while arrays remain compact JSON inside one cell so the converter does not invent extra records.

Open the JSON to CSV Converter
Full-body smoke-kawaii mascot explaining nested JSON boxes, flattened CSV columns, protected cells, and a downloadable table.
The JSON to CSV guide artwork explains nested-field flattening, quoted array cells, spreadsheet protection, and local CSV download as one visual sequence.View in the smoke-kawaii gallery

Quick start

  1. Paste one JSON object or an array containing only objects. Use double-quoted JSON keys and strings, with no trailing commas.
  2. Choose comma for common CSV, semicolon when your locale or receiving app expects it, or tab for a tab-separated file.
  3. Keep Escape spreadsheet formulas on when any field may contain text you did not write yourself.
  4. Add the UTF-8 BOM only when the spreadsheet app has trouble recognising non-English characters, then press Convert JSON.

Best uses

Use this workflow for small browser-side conversions, API samples, test fixtures, and quick spreadsheet review. Use a scripted ETL or database workflow when data is large, highly nested, or needs a custom schema.

  • Turn a small API response into spreadsheet rows without uploading it.
  • Flatten nested customer, product, or event objects into dot-notation columns.
  • Preview irregular JSON records before copying them into a data-cleaning workflow.
  • Create comma, semicolon, or tab-separated exports with spreadsheet formula protection.

What this converter helps with

The JSON to CSV Converter turns one JSON object or an array of objects into a rectangular CSV table. It is useful for small API responses, exports, and test data that you want to inspect in a spreadsheet without uploading the content.

Match each input label on the converter to valid JSON with an object at the top level or an array containing only objects, plus the delimiter and spreadsheet-safety settings required by the app that will open the file.

The logic in plain language

The converter parses the JSON, walks each object in first-seen key order, and flattens nested object paths such as profile.city. It builds one shared header list across all records, leaves missing fields blank, serializes arrays as JSON text, then applies CSV quoting to delimiters, quotes, and line breaks.

For `[{"id":1,"profile":{"city":"Brisbane"}},{"id":2,"profile":{"city":"Perth"}}]`, the shared headers are `id` and `profile.city`. The two objects become two rows. A later field is appended to the header list instead of rearranging earlier columns.

How to read the answer

Check the row and column counts first. Then scan the preview headers, especially dot-notation columns and blank cells. The preview is capped for readability, but copy and download include the complete converted result.

  • Rows is the number of top-level objects converted. One standalone object counts as one row.
  • Columns is the union of first-seen field paths across all objects.
  • A header such as profile.city came from a nested object path.
  • A blank cell means that object did not contain the shared field; it does not mean the converter deleted another value.
  • Protected cells counts values prefixed with an apostrophe because they began with =, +, -, or @ after optional whitespace.

Common mistakes to avoid

Most conversion problems come from invalid JSON, mixed top-level array items, ambiguous dotted field names, or opening untrusted cells in a spreadsheet with formula protection turned off.

  • Do not paste a JavaScript object literal with single quotes, comments, undefined, or trailing commas. Those are not valid JSON.
  • Do not mix strings, numbers, or arrays with objects in the top-level array.
  • Do not assume nested arrays should become extra rows. This converter keeps each array together in one cell.
  • Do not switch off spreadsheet formula protection for untrusted exports unless you have another reviewed sanitisation step.
  • Do not treat a UTF-8 BOM as a general repair for broken source encoding. It only helps some apps recognise the output encoding.
  • Do not use the browser tool as a replacement for schema validation, very large data processing, or a repeatable production ETL pipeline.

Worked example: nested JSON to two CSV rows

Start with `[{"name":"Ada","profile":{"city":"Brisbane"},"tags":["browser","private"]},{"name":"Grace","profile":{"city":"Sydney"},"tags":["csv","json"]}]`.

The converter creates `name`, `profile.city`, and `tags` headers. Each person stays on one row. The tags arrays remain JSON text inside their cells and are quoted because the array text contains commas and double quotes.

Why CSV fields sometimes need double quotes

A CSV field containing the selected delimiter, a line break, or a double quote must be wrapped in double quotes for common CSV readers. A double quote inside that field becomes two double quotes.

That is separate from spreadsheet formula protection. CSV quoting preserves the field boundary; the apostrophe prefix helps stop formula-like text from being interpreted as a command by a spreadsheet.

When to use a script or data pipeline instead

Use code when one array item should become several rows, column names need custom mapping, values need type conversion, or records need joins and validation. Those choices depend on your data model and should not be guessed by a general browser converter.

The 5 MB browser limit is deliberate. It keeps this page useful for quick local jobs without pretending to be a large-file processing service.

Research and references

RFC 8259 defines JSON objects and arrays. RFC 4180 documents common CSV quoting and record rules. OWASP explains why spreadsheet formula injection deserves a separate protection step. MDN documents the browser Blob used for the local download.

Worked examples for JSON to CSV Converter

Two simple rows[{"name":"Ada","team":"Data"},{"name":"Grace","team":"Platform"}]

Two CSV rows with name and team columns

Nested profile[{"id":1,"profile":{"city":"Brisbane"}}]

Columns named id and profile.city

Spreadsheet-safe cell[{"label":"=2+2"}]

The exported label starts with an apostrophe when protection is on

FAQ in plain language

Can I convert a single JSON object?

Yes. A single object becomes one CSV row. Its object keys become the header columns.

Can I convert an array of JSON objects?

Yes. Each top-level object becomes one row. Every array item must be an object; mixed primitive items are rejected.

What happens to nested objects?

Nested keys become dot-notation headers such as profile.city. If a direct key and a nested path flatten to the same name, the tool stops and asks you to rename one field.

What happens to arrays inside a record?

They remain compact JSON inside one CSV cell. The tool does not explode an array into extra rows.

Why does a value start with an apostrophe in the CSV?

Spreadsheet-safe mode adds it to cells starting with =, +, -, or @ so spreadsheet apps are more likely to treat the value as text instead of a formula.

Should I add a UTF-8 BOM?

Usually leave it off. Turn it on when a spreadsheet app misreads accented or non-English characters in a UTF-8 CSV.

Does Access Free Tools receive my JSON?

No. The conversion runs in your browser tab, and the JSON and CSV areas are masked from Microsoft Clarity.

Can this replace a production data pipeline?

No. Use it for small conversions and inspection. Large files, custom schemas, joins, array expansion, and repeatable imports need a reviewed script or ETL workflow.

Related tools

Keep exploring

If this guide is close but not exact, these links keep you near the same kind of problem.

Privacy and copying results

Your JSON and converted CSV stay only in the current browser tab. They are not sent to a conversion service, and the input, preview, and output are masked from Microsoft Clarity.

Use Copy CSV when you want to paste the complete converted table into a spreadsheet, text editor, or data-cleaning workflow. Check the delimiter, dot-notation headers, blank cells, and spreadsheet protection before reusing it.