1. Home
  2. Developer tools
  3. CSV ⇄ JSON

CSV ⇄ JSON

Turn a CSV export into clean JSON, or JSON arrays into a CSV you can open in Excel.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use CSV ⇄ JSON

  1. Paste data or open a file.
  2. Check the preview.
  3. Copy or download.

Features

  • Delimiter detection
  • Quoted fields
  • Header row option
  • Number and boolean detection
  • Table preview

Supported formats

You can open

  • CSV
  • TSV
  • JSON

You get

  • JSON
  • CSV

Private by design

Your files are opened and processed by your browser on this device. They are never uploaded to openWorkstand or anyone else, so the CSV ⇄ JSON is safe for contracts, IDs, photos and work documents. After you have used it once while online, it also works without an internet connection. How local processing works

Guide

Converting CSV to JSON (and back) for APIs, code and imports

CSV is how spreadsheets, databases and export buttons hand out data; JSON is what code, APIs and NoSQL databases expect. Converting between them is a common first step when importing data, seeding a test database, or sending a spreadsheet to an API. This converter works in both directions, previews the table, and keeps your data in the browser.

CSV to JSON

  1. Choose CSV → JSON.
  2. Paste CSV, or open a .csv, .tsv or .txt file. Comma, semicolon and tab separators are detected automatically.
  3. Check the table preview (the first 50 rows).
  4. Set the options:
    • First row is the header: each row becomes an object, such as {"name": "Ana", "city": "Lisbon"}. Off: each row is an array, ["Ana", "Lisbon"].
    • Detect numbers and true/false: 42 becomes a number and true a boolean instead of strings.
  5. Copy the JSON or download data.json.

If a row has problems, such as an unclosed quote or a different number of fields, the converter reports it with the row number.

Objects or arrays?

Shape Looks like Use when
Array of objects (header on) [{"id": 1, "name": "Ana"}] APIs, JavaScript, MongoDB imports, most code
Array of arrays (header off) [[1, "Ana"]] Compact data, charts, files without a header row

Type detection: when to turn it off

Detection is convenient: amounts and counts become real numbers you can calculate with. But it changes values that only look numeric:

  • Leading zeros: 00123 becomes 123, losing the zeros of ZIP codes, phone numbers and product codes.
  • Long IDs: very long digit strings can lose precision as numbers.
  • Version numbers: 1.10 becomes 1.1.

If any column holds codes rather than quantities, turn detection off and convert numbers in your code.

Typical CSV problems

  • Commas inside values must be quoted: "Lisbon, Portugal". Spreadsheet exports already do this.
  • Semicolon CSVs come from Excel in many European locales; detection handles them.
  • Title lines above the header, common in bank exports, break the column structure. Delete them first.
  • Accented characters showing as é mean the file isn’t UTF-8. Open it in a spreadsheet app and save it as “CSV UTF-8”.

JSON to CSV

Choose JSON → CSV and paste an array of objects (a single object also works). The keys become the header row, and each object becomes a line. Download data.csv and open it in Excel, Google Sheets or the CSV to Excel converter for a formatted workbook.

Nested JSON doesn’t fit into columns, because CSV is flat. Flatten nested objects first, such as turning address.city into a key of its own, or check the structure in the JSON Formatter.

Starting from Excel?

Export the sheet as CSV with Excel to CSV, choosing the right sheet, then convert here.

Privacy

Customer lists and exports often contain personal data. The conversion runs entirely in your browser and nothing is uploaded.

Who converts CSV and JSON

  • Developers turn spreadsheet data into JSON for APIs, apps and test fixtures.
  • Data analysts export JSON from APIs as CSV for spreadsheets.
  • Content managers prepare product or location lists for websites.
  • Students practice working with structured data.

A complete example: a store locator file

  1. Keep a spreadsheet with columns name, city, lat, lng.
  2. Export it as CSV and paste it here.
  3. Keep First row is the header on, and number detection on so coordinates become numbers.
  4. Copy the JSON array and save it as stores.json for the website’s map.

Tips

  • Turn number detection off for codes with leading zeros.
  • Flatten nested JSON before converting it to CSV.

Checked against the current version of the CSV ⇄ JSON on .

Troubleshooting

Everything ends up in one field

Your file probably uses semicolons or tabs (common in European Excel exports). The delimiter is detected automatically from the first lines; check that the header row uses the same separator as the data.

Leading zeros disappear (postal codes, IDs)

Turn off “Detect numbers and true/false” so every value stays text.

The file does not open

Check that it is one of the supported formats above and opens in another app. Damaged files and password-protected PDFs cannot be read until they are repaired or unlocked.

It is slow or stops on a very large file

Everything runs on your device, so speed depends on its memory. Close other tabs, use a computer rather than a phone, or split the file into smaller parts first.

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

How do I keep leading zeros like 00123?

Turn off "Detect numbers and true/false". Number detection reads 00123 as the number 123; with it off, every value stays text exactly as written, which is right for ZIP codes, phone numbers and product codes.

Can I convert an Excel file to JSON?

Export the sheet as CSV first with the Excel to CSV tool, choosing the sheet you need, then convert the CSV here.

How are nested JSON objects turned into CSV?

CSV is flat, so nested objects and arrays don't map neatly to columns. Flatten them first, for example by turning address.city into its own key, or keep the data as JSON.

My CSV converts into one big column. Why?

The separator wasn't recognized, often because the file uses an unusual one, or because the first lines are a title or notes instead of data. Remove any lines above the header row and try again.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.