Turnkey CSV ImporterInstalls in minutes

JSON CSV or TSV

To get started, upload or paste your JSON.

Download Copy to clipboard

Need help cleaning data?

Embed all the functionality of csvjson in any web application with Flatfile. Auto-match columns, validate data fields, and provide an intuitive CSV import experience.

More Details

  • This function is available as a npm package.
  • JSON to CSV will convert an array of objects into a table. By default, nested arrays or objects will simply be stringified and copied as is in each cell. Alternatively, you can flatten nested arrays of objects as requested by Rogerio Marques in GitHub issue #3.
  • CSV stands for Comma Separated Values. Often used as an interchange data format to represent table records, one per line. CSV is plain text.
  • TSV or Tab Separated Values is used to store table data in the Clipboard. You can then copy (Ctrl+C) and paste (Ctrl+V) it into Excel.
  • In French, Excel will expect a semi-colons ; instead of a comma ,. Make sure to pick that option if you are going to import the CSV file in Excel.
  • CSV values are plain text strings. Dror Harari proposed a variant called CSVJSON (csvjson.org). The variant proposes that every CSV value be a valid JSON value. More specifically, objects and arrays would not be wrapped in double quotes but output as is. Toggle the switch Output CSVJSON variant to output that format.
  • CSVJSON format variant is not valid CSV however every value is valid JSON. Parsing CSVJSON is done by processing one line at a time. Wrap a line with square brackets [] and use JSON.parse() to convert to a JSON array.
  • To convert from CSVJSON back to JSON, use the companion tool CSVJSON to JSON.
  • Dror Harari: "The reason why I came up with CSVJSON was not to allow embedding of JSON objects in a CSV line, that's a nice benefit but my main reason was to have the very well defined encoding semantics of JSON (as per json.org) be used to describe CSV lines (just taking out the [ and ])."

Jul 15, 2019

Fixed bug where BOM was missing causing the lost of accented characters in Excel. GitHub issue #78.

June 6, 2019

Fixed bug where uploading a file went to the result box instead of the json box. GitHub issue #75.

Feb 3, 2019

Refactored and published npm package json2csv.

Jan 26, 2019

Removed 64k limit on download button. Also fixed mime type.

Mar 31, 2018

CSVJSON format variant support: ensure CSV values are JSON valid.

Jan 24, 2018

Initial release.