About the CSV ↔ JSON Converter
CSV is the universal format for spreadsheets and data exports, while JSON is what most APIs and application code expect. Converting between them by hand is tedious and error-prone once you factor in quoted fields, commas inside values, and header rows.
This tool converts a CSV file (with a header row) into a JSON array of objects, and converts a JSON array of objects back into CSV.
How it works
- Paste CSV data (including its header row) or a JSON array of objects into the input box.
- Click CSV → JSON to get an array of objects keyed by column header, or JSON → CSV to flatten an array of objects into rows.
- Copy the result directly into your spreadsheet, database import, or application code.
Common use cases
- Importing a spreadsheet export: Converting a CSV exported from Excel or Google Sheets into JSON to feed into a script or API that expects structured objects.
- Preparing data for a spreadsheet: Converting a JSON array returned from an API into CSV so it can be opened and reviewed in a spreadsheet application.
- Quick data inspection: Converting a small CSV sample to JSON to check that column headers were parsed as the field names you expect.
Frequently asked questions
What happens if my CSV has commas inside a quoted field?
Standard CSV quoting (wrapping a field containing a comma in double quotes) is handled correctly — the comma inside quotes won't be treated as a column separator.
Does JSON → CSV work with nested objects or arrays?
The converter expects a flat JSON array of simple objects; deeply nested objects or arrays as field values may not flatten the way you expect, since CSV itself has no concept of nested structure.
What if my CSV rows have a different number of columns than the header?
Rows are matched to header columns by position, so a row with too few or too many values relative to the header can produce misaligned or missing fields — check for extra/missing commas in the source data.
Does the first row have to be a header?
Yes — CSV → JSON assumes the first row contains column names, which become the object keys for every subsequent row.
This tool runs entirely in your browser — nothing you enter is sent to a server. Read more in the Privacy Policy, or browse the full list of tools.