CSV to JSON converter
Paste CSV text with a header row to generate formatted JSON objects. Handles RFC 4180 quotes, commas, and line breaks in the browser, with options to auto-detect numbers and booleans or minify output. No data is sent to a server.
In-browser parser · Never uploaded
Need the reverse? Use the JSON to CSV converter, or inspect configs with the YAML to JSON converter.
Example
Convert three CSV user rows to JSON
Header name,role,remote followed by Ada Lovelace,Mathematician,true yields a JSON array of objects with typed booleans and string fields.
Related: JSON to CSV converter, YAML to JSON converter, Hash generator
FAQ
- Is my CSV uploaded to a server?
- No. The CSV is parsed directly in this tab using client-side JavaScript. No data is sent over the network or logged anywhere.
- Does the CSV require a header row?
- Yes. The first line of the CSV must contain column headers, which become the keys of each JSON object in the resulting array.
- How does this tool handle commas and newlines inside quotes?
- It follows standard RFC 4180 rules. Fields enclosed in double quotes can contain commas, line breaks, and escaped double quotes ("").
- What does auto-detect numbers and booleans do?
- When enabled, unquoted text matching numbers (e.g. 42 or 3.14) or booleans (true, false, null) are parsed into JSON numbers and booleans rather than strings. Strings with leading zeroes (like zip codes or phone numbers) remain strings.
- Can I convert JSON back to CSV?
- Yes. Use our paired JSON to CSV converter to turn an array of JSON objects back into an RFC 4180 CSV spreadsheet.
- How do I convert CSV to JSON without this page?
- Tokenize CSV according to RFC 4180: track quote state, treat doubled quotes as literal quotes, split on unquoted commas for fields and unquoted newlines for rows. The first row defines the keys. Map each subsequent row into an object where obj[headers[i]] = row[i]. If type coercion is enabled, parse numeric and boolean literals. Format with JSON.stringify(results, null, 2).