ToolsPoint Guide · By Vishal Kalariya, Founder & Editor · Updated November 15, 2026

How to Convert CSV to JSON (and JSON Back to CSV)

Turn spreadsheet data into JSON for APIs and apps — online or in code.

CSV is how spreadsheets export data; JSON is how APIs and JavaScript apps consume it. Converting between them is an everyday developer task.

Step-by-Step Instructions

  1. Export your sheet as CSV (Excel: Save As → CSV UTF-8; Google Sheets: File → Download → CSV).
  2. Paste or upload it into CSV to JSON.
  3. Check that the header row became the keys.
  4. Copy or download the JSON; validate it with the JSON Formatter.

Example

name,age
Ava,31
Leo,27

→ [{"name":"Ava","age":"31"},{"name":"Leo","age":"27"}]

Watch Out For

  • Commas inside values must be wrapped in quotes.
  • Numbers may come through as strings — convert types in your code if needed.
  • Use UTF-8 to keep accents and symbols intact.

Going the Other Way

Need a spreadsheet from an API response? Use JSON to CSV.

How Do I Export a Clean CSV From Excel?

In Excel choose File → Save As → CSV UTF-8 (Comma delimited). The UTF-8 option keeps accented letters and symbols intact. In Google Sheets use File → Download → Comma-separated values.

Why Are My Numbers in Quotes?

CSV has no data types – everything is text. A converter can guess numbers and true/false values, but values like ZIP codes (02134) or phone numbers should stay as text so leading zeros aren't lost. Check the output before importing it into an app.

Can CSV Become Nested JSON?

A flat CSV maps to an array of flat objects, one per row. For nested data, use column names with dots (for example address.city) and transform them in code, or keep the data flat – most APIs and databases accept flat records.

How Do I Convert CSV to JSON in Code?

In Python: import csv, json; rows = list(csv.DictReader(open('data.csv', encoding='utf-8'))); json.dump(rows, open('data.json', 'w'), indent=2). In JavaScript, libraries such as Papa Parse read CSV into objects that you can pass to JSON.stringify.

Frequently Asked Questions

Can I convert large CSV files?
Yes, within your device's memory. For millions of rows, use a script (Python's csv and json modules).
What if my file uses semicolons?
European versions of Excel often save with semicolons. Choose the semicolon delimiter so each value lands in the right field.
Is my data uploaded?
No. The CSV is converted in your browser.

Try it now: CSV to JSON

Convert CSV data into JSON. Free, fast and private.

Open CSV to JSON →

Get new free tools in your inbox

One short email a month with new tools, guides and productivity tips. No spam — unsubscribe anytime.

By subscribing you agree to receive emails from ToolsPoint Online. See our Privacy Policy.