ToolNook

CSV to JSON Converter

CSV to JSON converter and formatter that runs fully in your browser, plus JSON to CSV.

Nothing you paste or upload is sent to a server — all parsing runs in your browser.

JSON output

How this CSV to JSON converter works

CSV looks simple until a field contains the delimiter itself, a line break, or a literal quote mark. The RFC 4180 standard handles this by letting any field be wrapped in double quotes: a quoted field can contain commas and newlines freely, and a literal double quote inside it is written twice ("" becomes a single "). This tool implements a full character-by-character RFC 4180 parser rather than a naive split(','), so a row like "Smith, John",34 correctly produces two fields, not three.

The delimiter is auto-detected by scanning the first part of your input (outside quoted sections) and counting commas, tabs, semicolons and pipes, then picking whichever appears most consistently — you can always override it. With "first row is header" checked, that row supplies the object keys; otherwise columns are named col1, col2, and so on. Auto-convert turns the strings "true"/"false" into booleans, numeric text into JSON numbers, empty cells into null, and leaves everything else as text.

Nested keys let a flat CSV represent structured data: a header like address.city is split on the dot and written as a nested address object containing a city field in each row's object, which is handy when your CSV was exported from a flattened spreadsheet but you need nested JSON for an API. The JSON to CSV mode reverses the process: it collects the union of keys across all objects (or uses columns directly for an array of arrays), and re-quotes any value that itself contains the chosen delimiter, a quote, or a line break, so the round trip stays lossless.

CSV to JSON Converter: frequently asked questions

How does this CSV to JSON converter handle quoted fields?

It uses a full RFC 4180 parser, so fields wrapped in double quotes can contain commas, newlines and escaped double quotes (written as "") without breaking the columns.

Can it convert CSV files with tabs or semicolons instead of commas?

Yes. The delimiter is auto-detected from your data by checking commas, tabs, semicolons and pipes, and you can override the detected delimiter manually.

Does it convert numbers and booleans automatically?

With the "auto-convert types" option on, values like 42, 3.14, true, false and empty cells are converted to JSON numbers, booleans and null instead of staying as strings.

Can I create nested JSON objects from CSV headers?

Yes, enable "nested keys from dotted headers" and a header like address.city will produce a nested {"address":{"city": ...}} structure in the output instead of a flat key.

Is my data uploaded anywhere?

No. All parsing and conversion happens locally in your browser with JavaScript. Nothing you paste or upload is sent to a server.