Check the table before converting
CSV is a text representation of rows and fields, not a complete schema. The first row is often a header, but the format itself does not guarantee that each column has a unique name or that a value that looks numeric is meant to be a number.
This converter requires nonempty, unique headers and the same number of fields in every data row. That prevents a duplicate name from silently overwriting a value in a JSON object. If your source has no header, add one deliberately. A reported row number counts CSV records rather than assuming every physical line is a separate row.
Respect commas, quotes and newlines
The field "Books, tea" is one field because the comma is inside quotes. A literal double quote inside a quoted field is doubled. A quoted field can contain a line break, so splitting the input into lines and then splitting every line on commas is not a correct general parser.
Try the supplied sample, then add a note with a line break inside quotes. Check that it appears as one JSON value. An unclosed quote or unexpected text after a closing quote produces an error. Repair the source or confirm its dialect instead of deleting punctuation until the row happens to fit.
Try it with your own input
Your result
Keep identifiers as strings
A customer code such as 00127 is an identifier with five characters, not necessarily the integer 127. Large integer identifiers can also lose precision when coerced into JavaScript numbers. Dates such as 03/04/2026 are ambiguous without a locale and a schema.
The CSV-to-JSON result therefore keeps every field as a string. Assign types later, column by column, using a documented contract. If a column is a timestamp, use the timestamp guide to choose its unit and timezone. An empty field also needs an explicit decision: empty text, missing value and null are different states.
Export flat JSON objects deliberately
For JSON-to-CSV, use an array of flat objects. The converter collects the union of their keys and emits columns in first-seen order. A missing field or null becomes an empty cell. That makes the export convenient but loses the distinction between null and an empty string on a round trip.
Nested arrays and objects are rejected. Decide how to flatten a nested address, list of tags or repeated child record before exporting. Possible choices include separate columns, separate tables or a documented JSON string inside one cell. A converter should not make that modeling decision invisibly.
Protect a spreadsheet from executable cells
A CSV file opened by a spreadsheet can be interpreted as formulas. A value beginning with an equals sign can be more than ordinary text to that application. Quoting a CSV field correctly does not, by itself, prevent this interpretation.
Formula protection is on by default for exports. It prefixes potentially active cells with an apostrophe, including values beginning with plus, minus, at-sign or leading control whitespace. This intentionally changes the exported cell text and can affect numeric imports. Keep it on for untrusted data and inspect the destination application’s behavior; turn it off only with a clear reason and trusted input.
Verify a small round trip
Make a sample containing a leading-zero ID, a comma, a quote, an empty value, a newline and a non-ASCII name. Convert it to JSON, inspect each field, and export it back. Compare meaning and value boundaries, not only the visual appearance of the text.
For large datasets, browser memory is a practical limit and a dedicated pipeline may be a better fit. Save the original file, record the chosen delimiter and schema, and keep conversion separate from cleanup. The data conversion collection links the companion tools without asking you to upload the source.
Common questions
Why are numeric-looking values quoted in JSON?
They stay strings to preserve identifiers, leading zeroes and precision. Assign numeric types deliberately after conversion.
Can a CSV field contain a line break?
Yes, if it is quoted. A physical newline inside a quoted field does not start a new record.
What happens to duplicate headers?
They are rejected so one JSON property cannot silently overwrite another column.
Can I export nested JSON?
Not directly. Flatten nested arrays and objects using a documented mapping first.
Why did an apostrophe appear in my export?
Spreadsheet formula protection prefixes potentially active cells. It is enabled by default and can change the exported text.