TodayTools

CSV to JSON

Move a price list or contact sheet into the format your website or app expects.

PrivateNo uploadsRuns in your browser

Donate

Each row becomes {"name": "Arun", "maths": 91}. Best for most uses. Separator is the mark between cells; Auto finds it.

A shop owner sorting tools on a bench

For the shop owner

Your price list, ready for the app.

New stock in. Ilango adds this week's items to the website.

BeforeTyping every row again

With sdevOne click from sheet to app

  • Business Team

    Behind the counter

    The price list moves over between customers.

  • A shopper in a fruit market

    Happy buyers

    Shoppers see the new prices the same day.

How to convert CSV and JSON

  1. Pick a direction

    Use the CSV to JSON or JSON to CSV tab above. Paste into the left pane, press Open, or drop a .csv, .tsv or .json file onto it. Sample loads a class mark list (or, for JSON, a cricket score).

  2. Set the options

    For CSV, leave Separator on Auto and pick a shape: rows with names, rows as lists, or one list per column. Untick First row is header if row 1 holds data. For JSON, pick the separator and whether to write a header row.

  3. Check and export

    The table under the result previews the first 20 rows and the status line shows the row and column count. Press Copy, use Ctrl+C with nothing selected, or Download data.json or data.csv.

Good to know

  • Auto looks at the first 20 lines and picks the separator (comma, semicolon, tab or pipe) that splits them most evenly. Choose one by hand if a file has many commas inside quoted text.
  • Quoted fields follow the CSV standard: commas, line breaks and doubled quotes inside quotes are handled. Blank lines are skipped and Trim spaces removes spaces around values.
  • With Read numbers and true/false on, 42 becomes a number, true and false become booleans and empty cells become null. Values with a leading zero or more than 15 digits always stay strings.
  • JSON to CSV flattens nested objects into dot-separated columns (score.runs), joins arrays of plain values with commas and numbers arrays of objects (shots.0.name). The JSON must be strict; the JSON formatter can repair trailing commas and comments first.
  • Files over 2 MB are converted in a background worker without loading them into the editor. The screen shows the first 1 MB of the result; Download always has all of it, and Copy is disabled above 20 MB.
  • Nothing is uploaded. Parsing and conversion run in your browser.

Where people use it

  • Feed a spreadsheet to an app

    Export a sheet as CSV, turn it into JSON and load it into your app or test data.

  • Open API data in a spreadsheet

    Turn JSON records into CSV with one column per field, even nested ones.

  • Fix odd separators

    Files from other countries often use semicolons. The tool spots the separator for you.

  • Want a real Excel file?

    Make a proper .xlsx with column stats and charts instead of plain CSV.

    JSON to Excel converter
  • Start from an Excel file

    If your data is already in .xlsx, convert the sheet to JSON directly.

    Excel to JSON converter

Why this one

It works both ways on one page and keeps nested data readable by turning it into clear column names.

  • Finds the separator on its own: comma, semicolon, tab or pipe.
  • Reads numbers and true or false as real values.
  • Flattens nested JSON into neat columns.
  • Large files work, and nothing is uploaded.

What you can change

  • Separator, or let it find it
  • First row is the header
  • Rows with names or rows as lists
  • Read numbers and true/false
  • Trim spaces

People find this page by searching

  • csv to json
  • json to csv
  • convert csv to json online
  • json to csv converter
  • csv to json array
  • convert json to csv for excel
  • nested json to csv
  • csv file to json
  • large csv to json
Cite this tool
  • APA
    sdev.in. (n.d.). CSV to JSON and JSON to CSV converter [Web tool]. https://www.sdev.in/tools/csv-json
  • MLA
    "CSV to JSON and JSON to CSV converter." sdev.in, https://www.sdev.in/tools/csv-json.
  • Chicago
    sdev.in. "CSV to JSON and JSON to CSV converter." https://www.sdev.in/tools/csv-json.
  • BibTeX
    @misc{sdev-csv-json,
      title = {CSV to JSON and JSON to CSV converter},
      author = {{sdev.in}},
      howpublished = {\url{https://www.sdev.in/tools/csv-json}},
      note = {Web tool}
    }

Questions people ask

My CSV uses semicolons. Will it work?

Yes. Auto detects semicolons, tabs and pipes as well as commas, and the status line tells you which one it found. You can also pick the separator yourself.

Why are some numbers turned into text, or text into numbers?

With Read numbers and true/false on, anything that looks like a plain number becomes one, except values with a leading zero or more than 15 digits, which stay as strings. Untick the option to keep every cell as a string.

How is nested JSON turned into CSV columns?

Nested objects become dot-separated column names such as score.runs. Arrays of simple values are joined with commas in one cell, and arrays of objects get numbered columns like shots.0.name. The columns are every key seen across all rows, in the order they first appear.

Which shape should I choose for CSV to JSON?

Rows with names is the usual choice for apps and code. Rows as lists is smaller and drops the column names from each row. One list per column suits charts.

Is my file uploaded?

No. Parsing and conversion run in a web worker inside your browser. Files never leave your device.

Donate