CSV to JSON
Convert CSV data to JSON format for APIs and applications.
Convert CSV to JSON. Paste CSV from a spreadsheet export and get an array of objects, using the header row as keys, or arrays of values if there's no header. The separator is detected automatically (comma, semicolon, tab or pipe), quoted values with commas and line breaks are handled, and numbers and true/false can be converted to real JSON types. You'll see how many rows were read and a warning if a row has the wrong number of fields. It runs in your browser, so the data stays private.
Common use cases
- Load spreadsheet data into a web app or script
- Make test fixtures or seed data from a CSV
- Convert a CSV export for an API that accepts JSON
- Inspect CSV structure more easily
How to use
- Paste the CSV, or press Try an example.
- Check the separator and header options.
- Choose whether to convert numbers and booleans.
- Copy or download the JSON.
FAQ
Why are my numbers strings?
Make sure Convert numbers and true/false is ticked. Values with leading zeros, such as phone numbers and postcodes, stay as text so the zeros aren't lost, and numbers of 16 digits or more stay as text so they aren't rounded.
What if my CSV has no header row?
Untick First row is a header and each row becomes an array of values.
Can I check my CSV first?
Yes. The CSV validator reports rows with missing or extra fields and duplicate column names.
Related tools
- JSON to CSVConvert JSON arrays to CSV spreadsheet format.
- XML to JSONConvert XML documents to JSON format.
- YAML to JSONConvert YAML configuration files to JSON format.
- JSON to XMLConvert JSON data to XML document format.
- JSON to YAMLConvert JSON data to YAML configuration format.
- CSV Diff CheckerCompare two CSV files and highlight differences.