Using the JSON to CSV Converter
This page turns JSON into CSV and lets you download the file. The field starts as [{"a":1,"b":2}]. That array has one object. The keys become the header a,b. The values become the data row 1,2. The headline is 1 row, because one object produces one data row. The label above the headline reads CSV. Columns is 2. Rows is 1. Delimiter is Comma. Copy result copies the CSV text. Download CSV saves that same text as converted.csv.
The default nested style is Header / detail report style. The sample has no list inside the object, so the detail style and the separate-columns style write the same two lines. A list changes that. [{"name":"Ada","address":{"city":"Helsinki"},"tags":["red","blue"]}] in the default style repeats Ada and Helsinki once for red and once for blue. The CSV is name,address.city,tags then Ada,Helsinki,red then Ada,Helsinki,blue. The headline is 2 rows.
All on same row (separate columns) keeps one row and numbers the list positions. The same Ada object becomes name,address.city,tags.0,tags.1 and then Ada,Helsinki,red,blue. Concatenate (inside shared columns) joins the list in one cell. The tags cell is "red, blue", with quotes because the joined text contains a comma. Matrix style turns the fields into rows. One record produces a field column and a value column: name and Ada, address.city and Helsinki, and tags with "red, blue".
A chosen JSON file is read instead of the pasted text. The file must be UTF-8 and 1 MB or smaller. The page does not fetch a URL. Reset restores [{"a":1,"b":2}] and the waiting line Enter JSON. A comma, a quote, or a line break inside a cell is quoted, and a quote inside that cell is doubled. true and false stay those words. null is an empty cell.
What 1 Row and a,b Mean
The headline counts data rows, not lines of CSV. One object is 1 row. The CSV text still has two lines, because the header a,b is a line of its own and the values 1,2 are the data line. Columns is the number of header cells. Rows matches the headline. Copy result copies the CSV, including the header. It does not copy the words 1 row. Download CSV saves converted.csv. The saved file is the CSV text, with a byte-order mark at the start so a spreadsheet can read the encoding.
How Nested Objects Become Columns
An object inside an object is written with a dot. address and city become address.city. The sample city Helsinki is the cell under that header. The page walks the object from the outside in. It does not stop at the first level and reject the rest. A list is the point where the nested style matters. Header / detail report style finds the first list and writes one CSV row for each item in it. Parent fields repeat. The list item occupies the column named for that list, or the columns named for its keys when the item is an object.
Turning one XML element into JSON is a different page. The XML to JSON Converter turns one XML element into JSON. A note with to and body children becomes {"to":"Ada","body":"Hello"}. That page parses the XML. It does not fetch a URL, and it does not write a CSV header. Use it when the source is one XML element. Use this page when the source is JSON and the result should be CSV you can download.
Quoting, Null, and the Delimiter
A cell is quoted when it contains the delimiter, a quotation mark, or a line break. With a comma delimiter, x,y becomes "x,y". The text say "hi" becomes "say ""hi""" because the cell is quoted and each inner quote is written twice. A plain cell such as 1 or Helsinki is not quoted. Concatenate joins list items with a comma and a space, so red and blue become the cell "red, blue" when the delimiter is a comma. The quotes are part of the CSV rule. They are not extra characters stored in the JSON.
The Sample, a List, and a Quoted Cell
Leave the field as [{"a":1,"b":2}] and choose Convert to CSV. The headline is 1 row. Columns is 2. Rows is 1. Delimiter is Comma. The CSV is a,b followed by 1,2. Choose Download CSV and open converted.csv in a spreadsheet. The first row of the sheet is a and b. The second is 1 and 2. Copy result copies those same two lines without making you download first.
Compacting JSON is a different page. The JSON Minifier removes insignificant space from a JSON value. {"a": 1} becomes {"a":1}. The page parses the text first, so a broken value is rejected instead of being trimmed by hand. It does not fetch a URL, and it does not write a header row or a downloadable CSV. Use it when you want compact JSON. Use this page when you want CSV and converted.csv.
Size, Depth, and Column Count
The pasted JSON, and a chosen file, must be 1 MB or smaller. A longer paste is rejected with Enter JSON of 1 MB or smaller. A larger file is rejected with Choose a JSON file of 1 MB or smaller. Empty text, when no file is chosen, is rejected with Enter JSON or choose a JSON file. The page reads the file you choose on this form. It does not open a path you type, and it does not fetch a URL that you paste in place of JSON.
Mistakes that Change the Rows
A common miss is to read 1 row as one line of text. The sample CSV has a header line and a data line. Another miss is to expect every object to be rejected when its keys differ. Missing keys become empty cells. Another is to expect a nested object to be rejected. address.city is a column. Another is to leave Header / detail report style on and then be surprised that a list repeats the parent. Switch to All on same row when you want one CSV row per top-level item and a numbered column per list position.
JSON-LD from a type and a name is a different page. The Schema Markup Generator builds one JSON-LD object from a type, a name, and a description. The page does not publish the markup, and it does not claim that a search engine will use it. It does not turn [{"a":1,"b":2}] into a header a,b and a data row 1,2. Use it for that one object of markup. Use this page for JSON that should become CSV.
Saving converted.csv
Convert the sample first. Confirm 1 row, Columns 2, and the lines a,b and 1,2. Then choose Download CSV. The browser saves converted.csv. Open it and confirm the two columns. If the download does not start, use Copy result and paste the text into a file named with the .csv extension. The copy and the download contain the same CSV lines. The download adds a byte-order mark so Excel can detect UTF-8. The copy is the plain CSV.
Rebuilding the Sample and the Ada Rows
Enter [{"a":1,"b":2}]. Confirm the headline 1 row, Columns 2, Rows 1, Delimiter Comma, the header a,b, and the data row 1,2. Download converted.csv and confirm the sheet matches. Enter [{"a":"x,y","b":"say \"hi\""}] and confirm both cells are quoted and the inner quotes are doubled. Enter {"a":1,"b":2} without the array brackets and confirm the same a,b and 1,2. Clear the field and confirm Enter JSON or choose a JSON file. Enter { and confirm Enter valid JSON. Enter {} and confirm Enter a JSON object or an array with at least one value.
One RSS item is a different page. The RSS Feed Generator builds one RSS 2.0 item from a title, a link, and a description. The page does not publish the feed. It does not read a JSON array, and it does not write a CSV header. Use it when the task is that one item. Use this page when the task is CSV from JSON, including a download of converted.csv.
One Grid, Then the File
The sample, the Ada list, the quoted cell, and the epoch date are enough to see the page working. [{"a":1,"b":2}] produces the headline 1 row, the header a,b, and the data row 1,2. The Ada tags produce two detail rows by default, one numbered row in the separate-columns style, a quoted joined cell in the concatenate style, and a field column in the matrix style. A comma or a quote in a cell produces quoting, with inner quotes doubled. 1600000000 becomes 2020-09-13 only after you choose the date option.
Checking the Sample Before a Nested List
Confirm the sample before you paste a larger document. The headline should be 1 row, Columns should be 2, and the CSV should be a,b followed by 1,2. Download that small file once so you know the button saves converted.csv. Then paste the document you care about and choose the nested style on purpose. If the row count jumps, you are in Header / detail report style and a list was expanded. If the column count jumps with names such as tags.0, you are in the separate-columns style. If one cell contains a comma and quotes, you are in the concatenate style.
A keyword count is a different page. The Keyword Density Checker counts a keyword against the words in the text. In cat cat dog, the keyword cat is 2 of 3 words. The match ignores letter case. The page does not crawl a site, and it does not turn JSON into CSV. Use it to count a keyword in text you paste. Use this page to build the CSV and download it.