Paste your data
JSON, ideally an array of objects, or a CSV with a header row.
Paste JSON to get a table you can open in Excel or Google Sheets, or paste CSV to get JSON for a program. Nested objects, arrays, quotes and separators are handled for you.
100% private — your text is processed in your browser and never sent to any server.
Keep going with your result in another tool. Nothing is uploaded.
JSON, ideally an array of objects, or a CSV with a header row.
JSON to CSV or CSV to JSON, with the separator and options you need.
Paste it into a spreadsheet, a script, a database import or an API test.
JSON is what programs and web services exchange, and CSV is what spreadsheets and databases import. The two meet constantly: an API answer that someone wants to open in Excel, a spreadsheet that has to feed an application, an export that must be loaded into a database or a set of test data. This converter goes in either direction and takes care of the details that make hand conversion painful.
The best input is an array of objects, where each object becomes a row and each key a column. The column list is the union of every key found, in the order they first appear, so records with different fields still fit in a single table, and missing values are left empty. Nested objects are flattened using dots, so {"address": {"city": "Madrid"}} becomes a column named address.city. Arrays inside a record can be joined into one cell, kept as JSON text or spread over several columns, whichever your target needs. A single object becomes a one-row table, and an array of plain values becomes one column.
With a header row, each line becomes an object whose keys are the column titles; without one you get an array of arrays. The separator can be detected, so files from spreadsheets set to a comma, a semicolon or a tab are all read. Quoted fields are handled, including commas and line breaks inside quotes and doubled quotation marks. Optionally, text that looks like a number, true, false or null is turned into the matching JSON value, instead of leaving everything as text, and empty cells can be written as an empty string or as null.
Numbers are handled as text where possible, so a long identifier does not lose digits, and values with leading zeros, such as postcodes or phone numbers, are not converted into numbers, which would drop the zero. In CSV output, any value that contains the separator, a quotation mark or a line break is quoted correctly, following the standard convention.
CSV is flat and JSON is not, so a conversion from deeply nested JSON to CSV is a compromise. Rebuilding the original nesting from dotted column names is not attempted. Very large files are better handled by a script or a database import tool, since everything is processed in your browser's memory. To view or clean a CSV first, use the CSV viewer.
More utilities that also run without leaving your browser.