CSV to JSON

Convert a CSV table into an array of JSON objects, keyed by the header row and printed with indentation.

The output will appear here.

How CSV to JSON works

Convert a CSV table into an array of JSON objects, keyed by the header row and printed with indentation.

Input CSV
Output JSON
Works done 1,075

Related tools

CSV to JSON Details

CSV to JSON Converter turns a comma separated table into an array of JSON objects, using the first row as the keys.

Use it to move spreadsheet data into an API request, build test fixtures, or carry a table into code.

How to use it

Short version: give it input, run it, take the output. Details below.

  1. Paste the CSV into the box, with column names on the first row.
  2. Run the tool; every row becomes a JSON object.
  3. Copy or download the indented result.

Technical details

Conversion rules:

  • The first row supplies the keys; each remaining row produces one object.
  • The separator is a comma and surrounding whitespace in cells is trimmed.
  • Missing cells become empty strings rather than dropping the row.
  • Output is indented with two spaces, and the work happens in your browser.

When to choose this tool

This page moves tables into JSON. For the other direction use JSON to CSV, and to simply make existing JSON readable use the JSON Formatter.

The parser is deliberately simple: quoted cells containing commas, cells with line breaks, and semicolon separated exports will not split correctly. Every value is written as a string — numbers are not converted.

Practical notes

  • When exporting from a spreadsheet, choose the comma separator; some locales default to semicolons.
  • Simplify text columns that contain commas before converting.
  • If string numbers cause trouble downstream, cast them on the receiving side.

Where your data is processed

Because the input never reaches the server, nothing is left behind when you close the page. No request is made beyond the usage counter, and its body carries only the count itself.

Frequently asked questions

Type or paste your data into the CSV field, run the tool, then copy or download the JSON result.

Yes. While the text field is focused, Ctrl + Enter (Cmd + Enter on macOS) runs the tool.

You can copy the output or save it as a text file with the download button. The file name is based on the tool name.

The tool shows the error message in the output area. Fix the input and run it again.