Premium tools, free for everyone. Most run right in your browser.

OpenMultiURL

Developers

How to Convert JSON to CSV Online and Check Your Data

Coloured card showing the title How to Convert JSON to CSV Online and Check Your Data

A CSV that opens without an error can still have the wrong rows. That's the problem I want you to catch before you trust a converted file. When you convert JSON to CSV online, getting a download is only part of the job. I start by checking what counts as one record, then look at nested values and spreadsheet settings. Here's how I turn a list of JSON records into a table without treating a successful download as proof that everything survived.

How do I convert JSON to CSV online?

I built JSON to CSV for the move from structured data to spreadsheet rows. I test my tools on a budget Android phone and a laptop, and I've tried the workflow here with JSON to CSV. My starting point is a small, flat array of objects, because that lets me check the result without guessing how a nested structure should become a table.

  1. Keep the original JSON unchanged. Work with a copy so you can compare the export with its source.
  2. Check the copy in JSON Formatter and Validator before conversion.
    • Fix syntax errors before changing the data's structure.
    • Find the array that contains the records you actually want.
  3. Open JSON to CSV and paste the prepared array into the JSON input.
  4. Run the conversion and review the CSV output before saving it.
  5. Save the CSV, import it into your spreadsheet, and compare representative records with the original.

If you have a saved JSON file, I use the same route by opening it as text and copying its contents into the input. That avoids assuming a particular file-picker option is available. The file still needs valid JSON inside it; a .json filename doesn't prove that its contents are ready.

Tip from me: I start with a small sample that includes an ordinary record and an awkward one. A sample containing a missing value or nested field tells me more than several identical records.

What does a JSON array look like as CSV?

I find the difference easiest to see with a small example. Here, each object describes an item, and both objects use the same keys. The surrounding square brackets make the whole input an array.

[{"id":1,"name":"Desk"},{"id":2,"name":"Chair"}]

I expect this flat example to produce these columns and records.
idname
1Desk
2Chair

In the CSV text, the header is id,name. The following records are 1,Desk and 2,Chair, each on its own record line. I use this relationship as my first check: object keys become headers, and each object supplies the values for a row. That straightforward mapping is why a flat array works so well.

Why I keep the original JSON

JSON can hold strings, numbers, booleans, null, objects, and arrays. CSV stores tabular fields rather than that full structure. I don't call conversion lossless, because a table doesn't automatically retain the difference between every JSON type. Even converting the CSV back with CSV to JSON isn't proof that the original types and nesting have survived.

What JSON structure works best for CSV?

I decide what one row means before I convert anything. It might mean one product, one event, or one form response. If I can't finish that sentence clearly, I usually need to reshape the JSON first. Valid JSON and useful spreadsheet input aren't the same thing.

I use the input shape to choose my next step, rather than assuming every valid document will map the same way.
Input shapeWhat I checkMy next step
Flat array of objectsEach object represents the same kind of recordConvert a sample and check headers
Single objectWhether it represents one record or a containerPrepare a one-record array if appropriate
Object wrapping a records arrayWhere the actual records beginExtract the intended array
Array of arraysWhether column names are defined elsewhereAssign a clear schema before conversion
Deeply nested recordsWhich relationships the table must retainFlatten deliberately or make separate tables
JSONL or NDJSONWhether the converter explicitly supports that layoutUse compatible processing or prepare an ordinary array

How I handle a wrapped API response

An API response can contain both metadata and an array of records. I don't want a page count or status value to become an accidental data row. I locate the actual records and prepare that array for conversion. I also keep any metadata needed to explain the export alongside the original JSON.

The [JSON specification] (https://www.rfc-editor.org/rfc/rfc8259.html) describes valid JSON structures, not a universal rule for turning them into CSV. I treat a converter's supported shapes as a separate question from whether the input is valid.

How do I convert nested JSON and arrays to CSV?

I don't describe nested JSON as simply supported or unsupported. The useful question is what the output should mean. A nested object can become several columns, while an array might belong in one cell or in a separate table. Those choices change how you can sort, count, and filter the result.

How I flatten nested objects

For an object containing address and then city, I might prepare a flat field called address.city. That is a column-naming choice, not a special CSV feature. I check for clashes first: an existing top-level field called address.city could otherwise become confused with the flattened value. I prefer clear names over clever shortening.

  • For a short label list, I may join values into a single field when I only need to read the list.
  • For structure I need to preserve as text, I may serialize the nested value as JSON inside a CSV field.
  • For child records I need to count or filter, I prefer a separate table linked to the parent record.

Expanding an array into rows changes the meaning of the row count. A parent with several child items may now appear repeatedly. I check totals against the chosen layout rather than expecting the original record count to stay unchanged. I won't promise a particular automatic nesting rule for JSON to CSV here; I prepare flat records when I need predictable columns.

How are missing keys and null values handled?

I treat an absent key, null, an empty string, and zero as different source values. A spreadsheet full of blank cells can hide those differences. Before conversion, I decide which distinctions matter to the task and how the destination table will show them.

Converters can differ in how they discover headers and represent missing values. I don't assume they all collect every key or write null the same way. My check includes a record containing a field that appears later in the input. If that field matters, I confirm that it has a column in the result.

How I make blank cells less ambiguous

When the distinction matters, I prepare an extra status field rather than relying on a blank alone. That lets me distinguish an unavailable value from an intentionally empty one without changing a numeric zero into text. I document this choice with the export so that the table has a clear meaning later.

I also look for repeated keys within the same object. RFC 8259 says member names should be unique, and software behavior with duplicates is unpredictable. That's different from separate records using different keys. I fix duplicate names at the source rather than trusting whichever value happens to survive parsing.

Why does my CSV have the wrong columns or rows?

I separate conversion errors from import errors. If the CSV text has the expected fields but the spreadsheet shows one long column, I inspect the import settings. If the CSV itself contains unexpected headers, I go back to the input shape and the conversion choices.

  • If parsing fails, I check double quotes, commas, brackets, comments, and trailing commas in JSON Formatter and Validator.
  • If headers look unrelated to the records, I check whether I converted a wrapper object instead of its records array.
  • If values shift across columns, I inspect CSV quoting and the spreadsheet's delimiter setting.
  • If rows multiply, I check whether nested arrays were expanded into additional records.

I use JSON Formatter and Validator to make the input easier to inspect. But formatting doesn't decide the right table layout. A valid object can still contain the wrong array for your task, and matching syntax doesn't guarantee matching records.

Why commas and quotes need special care

Under RFC 4180, a field containing a comma, double quote, or line break should be enclosed in double quotes. Quotes inside that field are doubled. For example, the value Desk, large becomes "Desk, large", and He said "yes" becomes "He said ""yes""". I don't split CSV text on every comma or count physical lines as records, because quoted fields can contain both commas and line breaks.

How do I open the CSV correctly in Excel or Sheets?

I prefer an import workflow over opening a CSV and accepting every automatic choice. I check the delimiter, select UTF-8 where the application offers an encoding choice, and review columns before accepting the import. I follow the same checks in Excel or Google Sheets, though their controls differ.

The UK government's tabular-data guidance recommends UTF-8 and a header row. Microsoft also documents UTF-8 and comma delimiters for its IMPORTCSV function. But applications can interpret CSV differently, and locale settings can affect dates and numbers. I don't assume a file will display identically just because it has a .csv extension.

  • I import identifiers as text when leading zeros or exact digits must remain unchanged.
  • I compare long numbers, date-like values, and scientific notation with the original source.
  • I inspect accented characters and other non-ASCII text for encoding problems.

Tip from me: I check critical identifiers before saving the spreadsheet. If the import has already changed a value, changing the cell's display format afterward isn't a substitute for comparing it with the original.

I also separate CSV syntax from spreadsheet safety. OWASP's CSV injection guidance warns that untrusted cells starting with characters such as =, +, - or @ may be treated as formulas. Correct quoting doesn't remove that risk, and no single escaping method is reliable everywhere. I review untrusted values before opening them in spreadsheet software.

Can I convert privately or handle large JSON files?

I don't treat the word online as proof that data is uploaded, or proof that it stays local. Those are different processing models. Before using confidential input, I need a clear explanation of where conversion happens. I won't make a browser-only privacy promise for JSON to CSV without a verified basis for that claim.

If you need to investigate, I would inspect the page's processing information and browser network activity during conversion with harmless sample data. That can help reveal requests carrying the input, but it isn't a complete privacy audit. For restricted data, I choose an approved local workflow rather than relying on the absence of an obvious upload button.

Why I don't promise a universal file-size limit

JSON itself doesn't set one universal converter size limit. Parsers can impose limits, and local processing depends on memory, the browser, and the device. A deeply nested file and a flat file of similar size can present different work. I won't borrow another converter's limits and present them as limits for JSON to CSV.

For large or recurring exports, I prefer a repeatable local transformation with an explicit schema. For JSONL or NDJSON, I check support separately: newline-separated JSON values aren't the same input layout as one ordinary JSON array. I don't fix that by removing line breaks, because it still doesn't create the required array structure.

What mistakes should I avoid before sharing the CSV?

My biggest mistake to avoid is treating a readable spreadsheet as a verified export. A file can look tidy while missing a late-appearing field, merging different empty values, or changing an identifier. I want evidence that the table matches the task, not just evidence that an application can open it.

  1. Confirm what one row represents, especially if arrays were expanded.
  2. Compare headers with the required fields, including fields absent from the earliest records.
  3. Check representative records containing missing values, punctuation, nested content, and important identifiers.
  4. Confirm matching field counts across the header and data records using CSV-aware inspection.
  5. Keep the source JSON and record any flattening, joining, or missing-value rules used.

I use an online converter for a manageable one-off task. I choose a script or another controlled transformation when the same rules must run repeatedly, the data is restricted, or the structure needs several linked tables. That's a choice about control and repeatability, not a claim that one method is always better.

And I remember what CSV doesn't store. Microsoft documents that CSV saves text and displayed cell values, not workbook formatting or graphics. If I add presentation work in a spreadsheet, I keep a workbook copy rather than expecting a CSV export to preserve it.

Questions people ask

How do I convert a JSON file to CSV?

I keep the original file, open a working copy as text, and validate its contents. Then I locate the records array, prepare any nested fields, and paste the array into JSON to CSV. After conversion, I save the CSV and compare its headers and representative records with the source.

Can I convert JSON to CSV without uploading my data?

Yes, browser-local tools and local programs can perform conversion without uploading the input. But I don't assume a particular website works that way. I check its actual processing model before using private data. If I can't verify that model, I use an approved local method for confidential records.

What happens to arrays inside JSON objects?

I decide whether an array should become text in one cell, several columns, expanded rows, or a separate linked table. Different converters can make different choices. When I need predictable output, I prepare the representation before conversion and check whether the resulting row count still matches its intended meaning.

How are missing keys and null values handled?

I check this rather than assuming a universal rule. A converter may represent different source states with similar-looking empty cells. If missing, null, and empty text must stay distinct, I prepare an explicit representation or a separate status column, then inspect those cases in the converted output.

Can I convert JSON Lines or NDJSON to CSV?

Yes, with a workflow that understands that input layout. I don't treat JSONL as an ordinary JSON array, because each line contains a separate JSON value. I use explicit JSONL support or prepare a valid array first, then apply the same schema and nested-value checks before producing CSV.

Will Excel change long numbers or remove leading zeros?

It can reinterpret values during import, so I treat identifiers as text when their exact characters matter. I check leading zeros, long numeric strings, date-like values, and scientific notation against the original JSON. I prefer setting suitable column types during import rather than discovering changes after sharing the spreadsheet.

What to do next

I would start with a copy of your JSON and identify exactly what one spreadsheet row should represent. Validate the input, prepare nested fields deliberately, then open JSON to CSV and convert a representative sample. Check its headers, missing values, quoting, and important identifiers before converting the rest. When you import the saved CSV, review UTF-8, delimiter, and column-type settings instead of accepting every automatic choice. Keep the original JSON beside the export. That's how I turn a quick conversion into a table I can actually trust.

Sources I checked

Tools from this guide

Keep reading