ToolFox

CSV to JSON Converter

Convert CSV data to JSON, or JSON arrays back to CSV, entirely in your browser.

Result

How it works

CSV → JSON reads the first row as column headers and turns every following row into a JSON object keyed by those headers, using a proper character-by-character parser so commas and quotes inside quoted fields (like "Smith, John") are handled correctly rather than naively split on every comma. JSON → CSV takes a JSON array of flat objects and writes one CSV row per object, quoting any field that itself contains a comma, quote or newline.

Example

The CSV name,age / Alice,30 / Bob,25 becomes [{"name":"Alice","age":"30"},{"name":"Bob","age":"25"}] in JSON, and converting that array back produces the identical CSV — a full round trip.

Frequently asked questions

What happens if a CSV row has the wrong number of columns?

The converter reports exactly which row and how many columns it found versus expected, e.g. "Row 3 has 4 columns, expected 3", instead of silently producing malformed JSON.

Does it handle quoted fields with commas inside them, like addresses?

Yes — a field wrapped in double quotes can contain commas and newlines safely; a doubled quote ("") inside a quoted field represents one literal quote character.

Can I convert nested JSON, like objects with sub-objects, to CSV?

No — CSV is inherently flat (rows and columns), so JSON → CSV requires an array of flat objects; nested objects or arrays inside a field produce a clear error instead of a broken CSV.

Is my data uploaded anywhere?

No — both conversions run entirely in your browser; nothing is sent to a server.

Related tools