What This Tool Does
This converter parses CSV text and turns it into a JSON array of objects, using the first row of your CSV as the object keys (headers) and every subsequent row as one object in the array. Under the hood it uses a proper character-by-character CSV state machine rather than a naive split(','), so it correctly handles the cases that trip up simpler tools:
- Quoted fields containing commas — a value like
"Smith, John"stays as one field instead of being split into two columns. - Escaped double quotes — a doubled quote (
"") inside a quoted field is read as one literal"character, not as the end of the field. - Embedded newlines — a quoted field that contains an actual line break (common in Excel and Google Sheets exports) is kept intact instead of being cut off into a new row.
These are the exact pitfalls covered in more depth in our CSV to JSON guide — this tool implements the correct approach described there.
How to Use It
- Paste your CSV data into the Input box above, including the header row.
- Click Run to convert it.
- The resulting JSON array of objects appears in the Output box.
- Copy the output, or click Clear to start over with new data.
Worked Example
Given this CSV input, note the third row's address field contains a comma but is wrapped in quotes so it isn't split:
name,email,address
Alice Smith,alice@example.com,"123 Main St, Apt 4"
Bob Jones,bob@example.com,"45 Oak Ave"
Converts to:
[
{
"name": "Alice Smith",
"email": "alice@example.com",
"address": "123 Main St, Apt 4"
},
{
"name": "Bob Jones",
"email": "bob@example.com",
"address": "45 Oak Ave"
}
]
Notice the comma inside "123 Main St, Apt 4" is preserved as part of a single field value, rather than shifting the rest of that row into the wrong columns.
Common Use Cases
- Importing a spreadsheet export (Excel, Google Sheets, CRM/ERP report) into a REST API that expects JSON.
- Converting a CSV data export into an array of objects for use in a JavaScript or TypeScript application.
- Quick one-off data transformation when writing scripts, tests, or seed data without setting up a CSV library.
- Turning a database or analytics CSV dump into JSON for use in a NoSQL store or config file.
FAQ
What if my CSV has commas inside a field?
As long as the field is wrapped in double quotes, such as "Smith, John", the parser tracks whether it's inside a quoted field and won't treat that comma as a column separator.
Does it handle escaped quotes inside a field?
Yes. A doubled double-quote ("") inside a quoted field is read as one literal " character, matching standard CSV escaping, rather than ending the field early.
Are all values treated as strings?
Yes — this is a known limitation. CSV has no type system, and this tool doesn't infer numbers or booleans, so every value in the output JSON is a string. If you need numeric or boolean fields, convert them after import.
What happens to multi-line values in quoted fields?
A newline inside a quoted field is preserved as part of that field's value instead of starting a new row, so exports with multi-line cells (like addresses or notes) convert correctly.
Is my data uploaded anywhere?
No. The conversion runs entirely client-side in your browser; no CSV or JSON data is sent to a server or stored anywhere.
Related Tools & Guides
- Browse all JSON tools
- CSV to JSON: A Practical Guide for Developers
- JSON to CSV Converter (the reverse conversion)