Free · No sign-up · Runs in your browser

Convert CSV to JSON, or JSON to CSV.

Drop in a CSV and get clean JSON, or drop in a JSON file and get a spreadsheet-ready CSV for Excel or Google Sheets. The direction follows your file, and nothing leaves your device. CSV values come out as text; nested JSON fields stay as JSON text in one cell.

Not uploaded — nobody sees it Works both ways No watermark, ever No subscription or account
Your file is never uploaded — it’s processed right here in this browser tab, on your device. It never reaches a server, so we never see it, copy it or keep it.
At a glance

CSV to JSON and JSON to CSV: quick facts

CSV becomes JSON using the header row as field names; a JSON list of records becomes a CSV for Excel or Google Sheets.

Updated

Price
Free. No sign-up, no watermark.
Handles
Quoted fields with commas, line breaks and quotes; empty cells become "".
Values
Kept as text, so leading zeros in codes and phone numbers are safe.
Input
Comma-separated .csv saved as UTF-8 (not .xlsx or semicolon files), or a .json file. JSON Lines (.jsonl) needs wrapping in [ ] first.
JSON to CSV
One column per field seen across all records; missing fields are left empty and nested data is kept as JSON text in the cell.
Privacy
Your file is processed in your browser and never uploaded.
How it works

How to convert CSV to JSON (or JSON to CSV)

Drop in a .csv file and Altto turns each row into a JSON object, using your header row for the field names, then saves it as a neatly indented .json file. Drop in a .json file instead and it makes one row per record and one column per field.

  1. 01

    Add your file

    A .csv with a header row, or a .json list of records.

  2. 02

    Convert

    Altto works out the direction from the file and converts it, locally.

  3. 03

    Save the result

    A clean .json file, or a .csv ready to open in a spreadsheet.

Tips

Tips for clean JSON from a spreadsheet

A little tidying before you export saves fixing field names in your code later.

  • Make row 1 your headingsField names come from the first row, so a title or blank line above your headings ends up as the field names. Delete anything above the real header row before exporting.
  • Keep headings code-friendlyHeadings become keys, so “Order date” gives a key with a space in it. Short names such as order_date are easier to use in code, and Case Converter can turn a list of headings into snake_case.
  • Export as CSV UTF-8In Excel, use Save As and choose “CSV UTF-8 (Comma delimited)”; in Google Sheets, download as .csv. Both keep accents and symbols intact and use commas, which is what this tool reads.
  • Check it by converting backTo see that nothing was lost, drop the JSON back in here to make a CSV and compare the result with your original spreadsheet.

Like every Altto tool, this runs on your device — nothing you add is uploaded. How Altto works

2 spaces

of indentation lay out the JSON, one field per line, so it’s easy to read through and check before you use it.

JSON to CSV

Turning JSON into a tidy spreadsheet

JSON can hold shapes a spreadsheet can’t, so a little preparation gives you cleaner columns.

  • Fix the file if it won’t loadOne missing comma or quote makes a whole JSON file unreadable. If yours is rejected, open it in a code editor such as VS Code, which underlines the exact spot that’s broken.
  • Bring nested fields up a levelNested objects and lists are kept as JSON text inside a single cell, so nothing is lost, but you can’t sort or filter by them. If you need a nested value such as a city in its own column, move it to the top level of each record first.
  • Expect columns in first-seen orderColumns appear in the order fields first turn up, so a field that only appears in the 50th record becomes the last column. Rearrange columns in your spreadsheet afterwards if the order matters.
UTF-8

is how the CSV is saved, with the marker Excel looks for, so names with accents and symbols such as £ open correctly instead of turning into odd characters.

Example & tips

What your JSON will look like

Each row of the CSV becomes one object in a JSON array, and the header row supplies the field names.

Your CSV
name,city,orders
Alice,Leeds,3
"Smith, Bob",Birmingham,12
The JSON you download
[
  {
    "name": "Alice",
    "city": "Leeds",
    "orders": "3"
  },
  {
    "name": "Smith, Bob",
    "city": "Birmingham",
    "orders": "12"
  }
]

Things worth knowing before you convert

  • Every value comes out as text. 3 becomes "3", not the number 3. That's deliberate: it keeps leading zeros in things like phone numbers, postcodes and product codes ("0121", "007") exactly as they were. If you need real numbers, convert those fields in your own code afterwards — for example with Number() in JavaScript or int() in Python.
  • Headers become keys exactly as written. A column called Order ID becomes the key "Order ID", spaces and capitals included. If you want code-friendly keys like order_id, rename the header cells in your spreadsheet before exporting.
  • It expects comma-separated files. Some European versions of Excel save “CSV” files with semicolons instead. If your file looks like name;city;orders, re-save it with commas: in Google Sheets, File → Download → Comma-separated values always uses commas.
  • Excel's “CSV UTF-8” exports work as-is. Excel adds a hidden marker to the start of those files; Altto strips it, so your first field name comes out clean instead of with an invisible character in front of it.
  • Completely blank lines are skipped, so a stray empty row at the end of an export won't turn into an empty object.

What people use it for

  • Loading spreadsheet data into a website or app that reads JSON.
  • Seeding a database or test environment from a sheet someone else maintains.
  • Turning a list of products, locations or contacts into a config or data file for a developer.
  • Sending sample data to an API with a tool like Postman.

The output is a single JSON array, indented with two spaces so it's easy to read, and ready to load with JSON.parse(), Python's json.load() or most import tools.

FAQ

Frequently asked questions

How your rows and columns are turned into JSON, and what to do when a file won’t convert cleanly.

How does it decide the field names?
The first row of your CSV is used as the field names (keys) for every JSON object. If a column has no header, it’s named “column_1”, “column_2” and so on.
Does it handle commas and quotes inside a field?
Yes — fields wrapped in double quotes can safely contain commas, line breaks and escaped (““) quotes, following the standard CSV format most spreadsheet apps export.
What if two rows have different numbers of columns?
Each row still uses the header row’s field names — a missing value in a shorter row becomes an empty string in the JSON.
Is there a file size limit?
No hard limit, but very large files (hundreds of thousands of CSV rows or tens of thousands of JSON records) may take a moment and use noticeable browser memory, since everything happens on your device.
Why are my numbers in quotes in the JSON?
Every value is kept as text so nothing is changed by accident — leading zeros in phone numbers, postcodes and codes like “007” would be lost if they were turned into numbers. Convert the fields you need as numbers in your own code afterwards.
My CSV uses semicolons instead of commas. Will it work?
Not as it is — the tool reads comma-separated files. Re-save the file with commas first; downloading as CSV from Google Sheets always uses commas, and in Excel you can choose “CSV UTF-8 (Comma delimited)”.
Can I convert an Excel file directly?
Not an .xlsx file, only .csv. Open the workbook in Excel and use Save As with “CSV UTF-8 (Comma delimited)”, which saves the sheet you’re looking at. If your workbook has several sheets, save and convert each one separately.
Will accents and symbols come through?
Yes, if the CSV was saved as UTF-8. Older “CSV (Comma delimited)” exports from Excel on Windows use a different encoding, which can turn é or £ into odd characters. If you see that, re-save the file as CSV UTF-8 and convert it again.
What do empty cells become?
They become empty strings (“”) rather than being left out, so every object has the same fields in the same order. That makes the JSON predictable to work with, even when some rows are only partly filled in.
What kind of JSON works best?
An array of flat objects with the same fields — like [{"name":"Alice","age":30}] — converts cleanly into rows and columns. A single object is treated as one row.
What happens to nested objects or arrays inside a field?
They’re kept as a JSON-formatted string inside that CSV cell, so no data is lost — you just won’t get separate columns for their inner fields automatically.
What if my objects have different fields?
Every field seen across all objects becomes a column. Objects missing a given field simply get an empty cell there.
My JSON is wrapped like {"data": [...]}. What happens?
A wrapped file is treated as one object, so you'd get a single row with the whole list inside one cell. Copy out just the list inside the square brackets and convert that for one row per item.
Why did Excel remove the zero from my phone numbers?
The CSV still has the zero — Excel strips it when it opens the file and guesses the column is a number. Use Data → From Text/CSV in Excel and set that column to Text, or open the file in Google Sheets instead.
Can I open the CSV in Google Sheets?
Yes. In Google Sheets choose File, then Import, upload the file and Sheets splits it into columns for you. As in Excel, check columns such as phone numbers or IDs, and format them as plain text if their leading zeros matter.
Can I convert a JSON Lines (.jsonl) file?
Not as it is. JSON Lines files hold one record per line with no brackets around them. Put a [ at the start and a ] at the end, add a comma after every line except the last, save it as .json, and it becomes an ordinary list this tool can read.