CSV to JSON Converter
Convert CSV data into JSON, or JSON back into CSV, entirely in your browser.
CSV files store tabular data as plain text, with commas separating columns and each line representing a row, while JSON represents the same kind of data as an array of objects, one per row, with column headers becoming object keys. This tool converts between the two formats in either direction.
Choose a direction using the toggle, paste your data into the input box, and click Convert. Converting CSV to JSON uses the first row as column headers. Converting JSON to CSV expects an array of objects and uses the combined set of keys across all objects as the column headers, filling in a blank for any object missing a particular field.
This is useful for turning an exported spreadsheet into JSON for use in code, converting API data into a CSV file for sharing in a spreadsheet, or reformatting data between the two most common flat data formats.
Does this handle commas inside quoted CSV fields?+
Yes, fields wrapped in double quotes can safely contain commas, quotes, and line breaks and are parsed correctly.
What if my JSON objects have different keys?+
The resulting CSV includes every key found across all objects as a column, leaving a blank value for any object that doesn't have that key.
Is my data sent to a server?+
No. All conversion happens locally in your browser using JavaScript.
Does the first row need to be headers?+
Yes, when converting CSV to JSON, the first row is always treated as the column headers.