Loona Automation logoLoona Developer Tools
Home › Developer Tools › CSV to JSON Converter

CSV to JSON Converter - Spreadsheet Data as a Clean JSON Array

In short: the CSV to JSON Converter parses your CSV with a real character-by-character parser - quoted fields, commas inside quotes and doubled-quote escapes all handled - and turns each row into a JSON object keyed by the header row.

Splitting CSV on commas works until the first address field contains one. Paste your CSV below and get a correct JSON array, built by a parser that follows the actual CSV rules.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the CSV to JSON Converter

  1. Paste your CSV into the top box.
  2. Leave "First row is the header" ticked if your file has column names (untick it to get generated column1, column2... keys).
  3. Click Convert to JSON.
  4. Copy the result or download it as a .json file.

How it works

The converter runs a proper CSV state machine over your text one character at a time. It tracks whether it is inside a quoted field, so commas and even line breaks inside quotes stay part of the value, and a doubled quote ("") inside a quoted field becomes a single quote in the output. Windows (CRLF) and Unix (LF) line endings are both accepted, and blank lines are skipped. With the header option on, the first row supplies the object keys - duplicate column names are made unique with _2, _3 suffixes so no column silently overwrites another. All values stay strings, exactly as CSV stores them; turning "30" into the number 30 is a job for your code, not a guess this tool makes.

Worked example

The row "Ali, A",30,"said ""hi""" under headers name,age,note becomes {"name":"Ali, A","age":"30","note":"said \"hi\""} - the comma inside the name and the quotes inside the note both survive.

Frequently Asked Questions

Is this CSV to JSON converter free?

Yes - completely free, with no sign-up, no size limit and no daily cap.

Why do all values come out as strings?

CSV has no types - every cell is text. Guessing that "007" is a number would corrupt codes and IDs, so the tool keeps values exactly as written and lets your code decide what to convert.

What if two columns share the same name?

Later duplicates are renamed with a suffix (name, name_2, name_3) so every column survives in the output instead of overwriting the earlier one.

Can it handle quoted fields with line breaks?

Yes. A quoted field may contain commas, quotes (doubled) and even newlines - the parser treats everything between the opening and closing quote as one value.

Is my data uploaded to a server?

No. Parsing and converting happen 100% in your browser. Your data never leaves your device.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.