CSV ⇄ JSON Converter

Move data between spreadsheets and code. Paste or open a CSV file to get a JSON array, or paste JSON to get a CSV that opens straight in Excel or Google Sheets.

  • Files stay on your device
  • Free, no sign-up
  • Instant
CSV → JSON

Processed on your device. Your files are not uploaded to any server.

Quick guide · 4 steps

How to use the CSV to JSON Converter

When to use the CSV to JSON Converter

Importing spreadsheet data into apps

Turn an exported product or contact list into JSON for a website or API.

Exporting API data to Excel

Convert a JSON response into a CSV for analysis in a spreadsheet.

Seeding databases

Prepare JSON fixtures from data kept in Google Sheets.

Quick data checks

Look at CSV data as structured JSON to spot problems.

Features and benefits

  • Handles quoted fields, commas inside quotes and line breaks
  • Detects comma, semicolon, tab and pipe delimiters
  • Optional number and true/false conversion
  • Flattens nested JSON objects into dotted column names

Example

Input
name,age,city
Ali,30,Lahore
Output
[
  { "name": "Ali", "age": 30, "city": "Lahore" }
]

How the CSV to JSON Converter works

The CSV parser reads the text character by character, following RFC 4180: double quotes start and end quoted fields, a pair of quotes inside a field becomes one quote, and delimiters or line breaks inside quotes stay part of the value. The first non-empty line decides the delimiter if you choose automatic detection. For JSON to CSV, every object is flattened into dotted keys, all keys become columns in the order they first appear, and any value containing the delimiter, quotes or line breaks is quoted.

A real-life example

Imran keeps his shop’s 300 products in Google Sheets but his new website wants a JSON file. He downloads the sheet as CSV, opens it here, keeps “First row is the header” and “Convert numbers” on, and gets a JSON array where prices are numbers and names are text. One quoted product name containing a comma comes through correctly instead of splitting into two columns.

Good to know

CSV (comma-separated values) is the simplest way to exchange table data: every spreadsheet can open and save it. JSON is the format APIs and JavaScript use. Converting between them is a daily job for developers, analysts and anyone importing data into a website.

The parser follows RFC 4180, the CSV standard: fields containing commas, quotes or line breaks are wrapped in double quotes, and a double quote inside a field is written twice. Excel in many European countries saves CSV with semicolons; the converter detects that automatically.

For JSON to CSV, nested objects become dotted column names (address.city), and arrays are written as JSON text in a single cell, so no data is lost.

Tips for the best results

  1. Turn off number conversion for phone numbers and codes with leading zeros.
  2. Check the delimiter shown in the status line.
  3. Export from Excel as “CSV UTF-8” to keep accented characters.
  4. Use the JSON Formatter afterwards for very large outputs.

Common mistakes to avoid

Losing leading zeros

Postcodes like 01234 become 1234 as numbers. Turn off number conversion.

Unbalanced quotes

A missing closing quote swallows the rest of the file. The tool reports this error.

Assuming every row has the same columns

Missing cells become empty strings; check your data if columns shift.

CSV to JSON Converter – frequently asked questions

My CSV opens as one column in Excel – why?

Your Excel expects a different delimiter. Choose semicolon when converting, or use Data › From Text/CSV in Excel.

Are numbers kept as text?

With “Convert numbers and true/false” on, plain numbers become JSON numbers. Turn it off to keep everything as text (for example, phone numbers with leading zeros).

Can I convert an Excel .xlsx file?

Save it as CSV in Excel or Google Sheets first, then open the CSV here.

Is there a size limit?

Files of several megabytes convert quickly. Very large files depend on your device memory.

Does it support tab-separated files?

Yes. Choose Tab or let it detect the delimiter automatically.

What happens to nested JSON?

Nested objects become columns like address.city; arrays are kept as JSON text in one cell.