Skip to main content

From spreadsheet to API in one paste

The typical workflow: export from Excel or Google Sheets as CSV, paste it here, copy the JSON, paste it into your code or API test. What used to mean writing a throwaway Python script now takes ten seconds. The converter detects the header row automatically and uses it for the JSON keys, so 'Name,Email,Role' becomes objects with name, email, and role fields.

Watch out for the usual CSV headaches: inconsistent quoting, stray line breaks inside fields, and Excel's habit of reformatting dates and large numbers. If the output looks wrong, the input CSV is almost always the culprit: open it in a plain text editor (not Excel) to see what's actually there.

How to Use CSV ↔ JSON Converter

  1. 1Choose the direction: CSV → JSON or JSON → CSV.
  2. 2Paste your data, drop a file onto the box or open one (up to 20 MB), or try the sample. For CSV, the first row must be the column headers; comma, semicolon, tab and pipe separators are detected automatically, or choose one.
  3. 3The output appears as you type, with a count of rows and a warning if some rows had more fields than the header. Choose pretty, minified or JSON Lines output, and whether numbers and true/false become values.
  4. 4Copy the result, or download it as a .json, .jsonl or .csv file (the CSV opens in Excel with accents intact).
  5. 5If your CSV has a header row, make sure it's the first line: the converter uses it for the JSON keys. No header? Add one first, or you'll get generic keys like 'column1'.

Frequently Asked Questions

How is CSV turned into JSON?

Each row after the header becomes one JSON object, using the header names as keys. The file 'name,city' / 'Ana,Lisbon' becomes [{"name": "Ana", "city": "Lisbon"}]. Missing values become empty strings.

Does it handle commas and line breaks inside values?

Yes, when the value is in double quotes, as spreadsheets save it: "Smith, John" stays one field, a line break inside quotes stays part of the value, and a doubled quote ("") becomes a single quote mark. An unclosed quote is reported as an error.

Does it work with semicolon-separated files?

Yes. Excel in many European countries saves CSV with semicolons, data copied from a spreadsheet is tab-separated, and database exports often use pipes (|). The converter checks the header line and uses whichever separator it finds, and you can pick one yourself.

Are numbers converted to numbers?

Only if you ask. By default every value stays a string, exactly as it appeared in the CSV, which protects phone numbers, ZIP codes and IDs with leading zeros. Tick 'Numbers and true/false as values' to turn 42 into a number and true into a boolean; values like '02134' and numbers too big for JavaScript still stay as text.

What is JSON Lines?

One JSON object per line, with no surrounding array: the format log tools, BigQuery and many data pipelines read and write (also called NDJSON). Choose it as the output layout, or paste JSON Lines into the JSON → CSV side.

How does JSON become CSV?

Paste an array of objects. The columns are every key found in any object (not only the first), in the order they first appear. Values with commas, quotes or line breaks are quoted correctly, and nested objects or arrays are written as JSON inside the cell, so no data is lost.

Is my data uploaded?

No. The conversion happens in your browser, so customer lists, exports and other private data stay on your device.

What if my data has commas inside the fields?

That's what quotes are for. A proper CSV wraps fields containing commas in double quotes: "Smith, John",25,Engineer. The converter handles quoted fields correctly. If your file doesn't quote them, the commas will split the field: fix the CSV first.

Can I convert JSON back to CSV?

Yes, it works both ways. Pick JSON → CSV at the top, or open a .json or .jsonl file and it switches for you; JSON Lines works as well as a normal array. Choose the separator your spreadsheet expects (a comma, or a semicolon for Excel in much of Europe, tab or pipe), then copy the CSV or download it as a .csv file.

About CSV ↔ JSON Converter

The CSV ↔ JSON Converter turns spreadsheet data into JSON for code and APIs, and JSON back into CSV for Excel or Google Sheets. Paste, convert and copy, with a count of the rows converted.

It parses CSV properly. Quoted fields can contain commas, quotes and line breaks, as spreadsheets produce them. Comma, semicolon and tab separators are detected. If a row has more values than the header has columns, it says so rather than silently dropping data. Going the other way, every key in every object becomes a column, and nested values are kept as JSON.

Values are kept as text, so IDs, phone numbers and codes with leading zeros survive unchanged. Everything runs in your browser.

CSV is how the world moves tabular data around: spreadsheet exports, database dumps, survey results. JSON is how applications consume it. The gap between the two is where this converter lives: paste the spreadsheet export, get clean JSON with proper keys, ready to drop into code or an API.

You May Also Like