Convert JSON to CSV and back. Your data stays on your device.
A CSV file is a flat table, and JSON is not. To fit one into the other, each nested object is spread across columns named with dots. In {"address": {"city": "Pune"}} the value Pune goes in a column called address.city, and deeper levels add more dots, so address.geo.lat is a third level down. An array is not spread out. It is written into one cell as JSON text, for example ["a","b"], so no values are lost and the cell can be parsed again later. An empty object becomes {} and a null becomes an empty cell. Numbers and true or false are kept as typed. The columns appear in the order each key is first seen, reading the rows from the top. A row that lacks a key gets an empty cell in that column. If a key written with a dot, such as "a.b", collides with a flattened one, the later value wins. The top level must be an array of objects, or one object, which becomes a single row. An array of arrays or plain values is refused, with the number of the first item that is not an object.
A cell is wrapped in double quotes when it contains the delimiter, a double quote or a line break. A quote inside a quoted cell is written twice, so She said "hi" becomes "She said ""hi""". A line break inside quotes stays inside the cell and does not start a new row. When you convert CSV to JSON, the same rules are read in reverse. If a quoted value is never closed, the tool stops and names the line where it began. The delimiter on output is a comma, a semicolon or a tab. In places where a comma is the decimal mark, spreadsheet programs often expect semicolons, so choose semicolon if the columns do not split when you open the file. For CSV input the delimiter can be detected for you from comma, semicolon and tab, or you can set it. Output uses plain line feeds and has no byte order mark.
Excel and Google Sheets treat a cell that starts with =, +, - or @ as a formula. If the data comes from people you do not control, a cell such as =HYPERLINK(...) can run when the file is opened. With the protection option on, which is the default for CSV output, any text cell that starts with one of those characters, or with a tab or carriage return, gets a leading apostrophe. The spreadsheet then shows the text instead of running it. The apostrophe is real data in the CSV file, so a phone number written as +91 98765 comes back as '+91 98765. Real JSON numbers such as -5 are not touched, but the text "-5" is. Turn the option off only when you trust the source and need the cells exactly as they are. The protection is for CSV output only; CSV to JSON never changes your text.
CSV has no types, so every cell is text. By default CSV to JSON keeps it that way, which is why 00123 stays 00123 and a long account number does not turn into a rounded number. Switch on Convert numbers and true/false if you want plain numbers and the words true and false to become JSON values. Only canonical forms are converted: 7, -3 and 2.5 qualify, while 00123, 1.50, 1e3 and +5 stay as text. JSON has a limit of its own. A number with more than about 15 digits cannot be held exactly by a browser, and most tools quietly round it. Going from JSON to CSV, this tool finds such numbers in your text and writes them into the CSV with exactly the digits you typed, and tells you how many there were. Going from CSV to JSON, a long number stays text unless it converts without change. The conversion runs in this tab, nothing is uploaded, and a file you load is read by your browser only.
An array becomes one cell holding JSON text, for example ["a","b"] or [1,2,3]. It is not spread over several columns, so the values survive and the cell can be parsed again. Objects inside the array stay inside that text.
Normally they do not. CSV to JSON keeps every cell as text unless Convert numbers and true/false is on, and even then 00123 stays text, because only canonical numbers such as 7 or 2.5 are converted. If zeros vanish after you open the CSV in Excel, that is Excel guessing a number; import the column as text.
Try semicolon. Where the comma is the decimal mark, as in 3,14, spreadsheet programs often expect semicolons between cells. A comma file may then open in one column. Pick semicolon under CSV delimiter, or tab if the data holds many semicolons.
No. Pasted text and loaded files are converted by your browser in this tab, and nothing is sent to a server. The page counts visits with Google Analytics, using the name of the tool and a size group such as under 1 MB, never your data or a file name.
20 MB for a loaded .json, .csv or .txt file. Above 2 MB the result updates a moment after you stop typing, and the preview shows the first 50 rows, while Copy and Download deliver every row. For bigger files, split them first.
That is the formula protection. A cell such as =1+1 or +91 98765 would be run or reinterpreted by Excel or Sheets, so a leading apostrophe makes it text. Untick Protect against spreadsheet formula injection to turn it off.
No. It converts JSON and CSV only. Choose .json, .csv or .txt files. It also does not rename, pick, sort or filter columns; every column found in the data is written.