Toolerax logoToolerax

CSV to JSON Converter

Convert CSV to JSON and JSON back to CSV.

100% private — runs in your browser, nothing is uploaded.

How to use the CSV to JSON Converter

  1. 1
    Paste your data

    Put CSV (with a header row) or a JSON array of objects into the input box.

  2. 2
    Choose a direction

    Click CSV → JSON to convert a spreadsheet export, or JSON → CSV to flatten data.

  3. 3
    Check the output

    The converted result appears below, pretty-printed for JSON.

  4. 4
    Copy the result

    Use the copy button to grab the output for your code or spreadsheet.

Examples

InputOutput
name,age\nAlice,30[ { "name": "Alice", "age": "30" } ]
[{"a":1,"b":2}]a,b\n1,2

Free online CSV to JSON converter

This CSV to JSON converter turns spreadsheet-style CSV data into a clean JSON array of objects — and converts JSON back to CSV. It is ideal for moving data between spreadsheets, APIs and code without writing a parser yourself.

How the mapping works

The header row of your CSV becomes the object keys, and every subsequent row becomes one object in a JSON array. Going the other way, each object becomes a row and the union of all keys becomes the header line, so mixed objects still line up correctly.

Proper CSV handling

  • Quoted fields may contain commas and line breaks.
  • Doubled quotes inside a quoted field become a single literal quote.
  • Both \n and \r\n line endings are supported.

Everything runs in your browser, so even large or sensitive datasets stay completely private and the tool keeps working offline.

Frequently Asked Questions

How does CSV to JSON conversion work?

The first row of your CSV is treated as the column headers. Each following row becomes a JSON object, mapping each header to that row's value. The result is a JSON array of objects.

Does it handle commas and quotes inside fields?

Yes. The parser follows CSV rules: fields wrapped in double quotes can contain commas and line breaks, and a doubled quote ("") inside a quoted field is treated as a literal quote.

Can it convert JSON back to CSV?

Yes. Paste a JSON array of objects and click JSON → CSV. The tool collects all keys as headers and writes one row per object, quoting values that need it.

Are all values treated as text?

When converting CSV to JSON, values are kept as strings, because CSV has no types. If you need numbers or booleans, you can post-process the JSON in your code.

Is my data uploaded to a server?

No. Parsing and conversion happen entirely in your browser, so your data never leaves your device. That makes it safe for sensitive spreadsheets and works offline.

What if my JSON isn't an array of objects?

JSON → CSV expects a top-level array of objects, since that maps naturally to rows and columns. Other shapes will show an error so you can adjust the structure.

From the blogHow to Convert CSV to JSONHow CSV maps to JSON, why commas inside quotes break naive parsers, the Excel traps that corrupt your data, type conversion, and nested structures.Read the full guide

Related tools