CSV to JSON Converter
Convert between CSV and JSON in either direction, with proper handling of quoted fields, embedded commas and nested objects.
About CSV to JSON Converter
CSV is what spreadsheets and data exports speak; JSON is what APIs and applications speak. This converter goes both ways, and handles the parts that trip up naive conversions — fields wrapped in quotes, commas inside quoted values, embedded newlines, and inconsistent row lengths.
Going from CSV to JSON, the first row becomes object keys and each subsequent row becomes an object. Numeric and boolean values are detected and converted to real JSON types rather than left as strings, which is usually what you want when the output is destined for code.
Going the other way, an array of objects becomes CSV. The header row is built from the union of every key across all objects, so records with differing shapes still produce a complete table rather than silently losing columns. Nested objects are flattened using dot notation, since CSV has no way to express nesting.
How to use it
- 1Paste your CSV or JSON into the input box, or upload a file.
- 2Pick the direction — CSV to JSON, or JSON to CSV.
- 3Convert, and check the output panel.
- 4Copy the result or download it as a file.
Common uses
- Turning a spreadsheet export into JSON for an API request or seed file
- Converting an API response into CSV for a stakeholder who wants a spreadsheet
- Reshaping data during a migration between two systems
- Building test fixtures from real exported data
Frequently asked questions
Does it handle commas inside quoted fields?
Yes. Parsing follows the CSV convention properly, so a quoted field containing commas, escaped quotes or line breaks is treated as one value. This is the most common way hand-rolled CSV splitting goes wrong.
What happens to nested JSON objects?
They are flattened with dot notation, so a nested address object becomes columns like address.city and address.postcode. CSV is a flat format and cannot represent nesting any other way. Arrays inside objects are serialised as JSON strings within the cell.
Are numbers converted to real numbers?
Yes, values that parse cleanly as numbers or as true/false become JSON numbers and booleans rather than strings. Values with leading zeros are deliberately kept as strings, since those are usually identifiers like postcodes or account numbers where the zero matters.
Is my data uploaded?
No. Both directions run entirely in your browser, which makes this safe for customer exports and other data you should not paste into a remote service.