JSON to CSV Converter
Give it a top-level JSON array of objects and you get a CSV with one row per object and a column for every key that appears in any of them. Nested objects and arrays are written as JSON text inside a single cell, so flatten them first if you need separate columns.
Download Started!
How would you rate your experience with MiConvert?
From a JSON array to rows and columns
JSON is how most web APIs, apps and NoSQL databases hand over data: objects made of key and value pairs, often nested inside one another. Spreadsheets do not treat it as a table. Double-clicking a .json file usually opens a text editor, and Excel only imports JSON through Power Query. CSV is the opposite: a flat grid that Excel, Google Sheets, Numbers and nearly every database import screen accept directly.
On our server, the converter reads the file as UTF-8 and parses it with a strict JSON parser, so the file has to be valid JSON. It then collects every key used by any object in the top-level array and writes that full set as the header row, followed by one row per array element. Every field is enclosed in double quotes, lines end with a single line feed, and no byte-order mark is added. Values of 0 and false are written out rather than treated as empty.
There is no flattening. A nested object or array lands in one cell as JSON text. For example, {"name":"Ana","address":{"city":"Köln"}} produces an address column containing {"city":"Köln"}, not an address.city column. The shape of the top level matters as well. A single object becomes a single row, and the common API wrapper {"data":[...]} becomes one cell holding the entire array. Pull the array out before you convert.
Because the CSV has no byte-order mark, Excel can misread accented or non-Latin text when you simply double-click the file. Loading it through Data, From Text/CSV with UTF-8 selected avoids that, and Google Sheets reads the file correctly as it is.
The tool is built for one-off jobs: an API response you want to sort in a spreadsheet, a MongoDB export to hand to a colleague, or a test fixture to inspect. If you convert the same feed every day, or you need nested fields as their own columns, a short Python or PowerShell script gives you control this page does not offer.
How to convert JSON to CSV
- Open the file and check its first character. It should be [ followed by objects. If it starts with { and the records sit under a key such as data, results or items, copy that array into its own file.
- If each line holds a separate object (JSON Lines or NDJSON, which is also the default mongoexport output), add [ at the start and ] at the end, and put a comma after every line except the last.
- Delete comments and trailing commas, then check the file with a JSON validator. Only strict JSON is accepted.
- Decide how to handle nested fields. If you need them as separate columns, flatten them before uploading. Otherwise they arrive as JSON text in one cell.
- Upload the .json file and convert it. Typical files are ready within a few seconds after the upload.
- Download the CSV. For Excel, load it through Data, From Text/CSV with the file origin set to UTF-8 so that non-English characters display properly.
What the JSON to CSV converter does
- Builds the header from every key across all objects, so a field that only some records have still gets its own column
- Writes one CSV row per element of the top-level array
- Wraps every field in double quotes and writes UTF-8 with LF line endings and no BOM
- Writes zero and false values as 0 and false instead of leaving the cell empty
- Keeps nested objects and arrays as JSON text in their cell instead of discarding them
- Shows the raw parser message when the file is invalid, often with the character position of the problem
Video Tutorial
Watch this step-by-step tutorial to learn how to convert JSON files to CSV format online for free using MiConvert.com. No software installation required.
JSON to CSV questions
Does it flatten nested JSON into separate columns?
No. Nested objects and arrays are written as JSON text inside a single cell. To get columns such as address.city, flatten the data first. In Python, pandas.json_normalize creates dotted column names from nested records, or you can reshape the objects in your own code before uploading.
Why did my file turn into one row or one huge cell?
The top level of your JSON is an object rather than an array. A plain object becomes a single row. A wrapper such as {"data":[...]} or {"results":[...]} becomes one cell that contains the whole list. Copy the inner array into a new file so that it starts with [ and convert that file instead.
What does "Unexpected end of JSON input" mean?
The parser reached the end of the file while an object, array or string was still open. In practice, the file was cut short: a download stopped early, a copy-paste missed the last lines, or the file is empty. Export or download it again, confirm it ends with the closing bracket, and run it through a validator before uploading.
Why does it say "Unexpected token ... in JSON at position N"?
Something at that character position is not valid JSON. Common causes are one object per line without surrounding brackets, comments, trailing commas, and single-quoted strings. Wrap line-delimited records in [ ] with commas between them, remove comments and trailing commas, and use double quotes.
Can I convert JSON to CSV locally with Python or PowerShell instead?
This page uploads your file to our server; it does not run in your browser. To keep the data on your own machine, use a script. In Python with pandas, pandas.read_json('data.json').to_csv('data.csv', index=False) handles flat arrays. In PowerShell, Get-Content data.json -Raw | ConvertFrom-Json | Export-Csv data.csv -NoTypeInformation does the same.
How do I open the result in Excel without broken characters or a single column?
Use Data, From Text/CSV, choose UTF-8 as the file origin and comma as the delimiter. This also helps when your Excel region expects semicolons and would otherwise put everything in column A. Excel can also import JSON directly through Data, Get Data, From File, From JSON, which opens Power Query and can expand nested records.
Is there a charge or a file size limit?
Converting costs nothing and needs no sign-up for files up to 50 MB. Signed-in accounts can upload 100 MB, Plus 200 MB and Pro 1 GB per file. The whole JSON file is loaded into memory, and data conversions are not eligible for the pay-once option for files over 1 GB, so split larger exports before converting.
Who can see my JSON file, and how long is it kept?
Your upload is sent over HTTPS and deleted from our server once the conversion job ends. The CSV can be downloaded through a random, unguessable link for about 4 hours and is then deleted automatically. The link is not tied to your account, so anyone you send it to can use it until it expires. Our logs record file names, sizes and results, and signed-in users keep a conversion history entry until they delete their account.