Skip to content

Menu

CSV ↔ JSON Converter

Convert between CSV and JSON with custom delimiters, header detection, and file upload

Runs entirely in your browserFormattersFree, no sign-up
Loading tool

01What is CSV ↔ JSON Converter?

Spreadsheets speak CSV and APIs speak JSON. Moving data between the two by hand gets messy fast, especially once a cell contains a comma or a line break. This converter handles both directions in one place and updates the output as you type. In CSV to JSON mode the first row is always treated as the column names. Every row after that becomes one object, so you get a JSON array of objects. Parsing follows RFC 4180, the IETF document that describes the common CSV format. Quoted fields can hold the delimiter, doubled quotes and real line breaks. A two-line address in a quoted cell stays one value instead of splitting the row. A few cleanups happen on the way in. A leading byte-order mark, which Excel often adds, is ignored. Blank lines are skipped. Unquoted values are trimmed, while quoted ones are kept exactly. Empty or repeated headers are renamed, so name,,name becomes name, column2 and name_2 and no value gets overwritten. Short rows are padded with empty strings. Every value stays a string. We deliberately don't guess types, so an ID like 00123 keeps its leading zeros and a long account number isn't rounded. Convert numbers in your own code where you know the schema. JSON to CSV works the other way. Paste an array of objects or a single object. The header row is the union of keys across all objects, in first-seen order, so a key that only shows up in row 50 still gets a column. Nested objects and arrays are written into one cell as JSON text. Null and missing values become empty cells. Any value containing the delimiter, a quote or a line break is wrapped in quotes with inner quotes doubled. Rows are joined with CRLF line endings, as RFC 4180 specifies. Here's a quick example. The JSON [{"a":1,"b":"x,y"},{"a":2,"c":true}] becomes a header of a,b,c, then 1,"x,y", and finally 2,,true. The comma inside x,y is protected by quotes. You can switch the delimiter between comma, semicolon, tab and pipe at any time, upload a .csv, .tsv or .txt file, and copy or download the result. The file you upload is read by your browser and never sent to a server. Limits worth knowing: an unclosed quote stops the conversion with an error, but the message doesn't say which row caused it. Arrays of plain values, like [1,2,3], are rejected because there are no keys to use as columns.

Backend and integration developers who move data between spreadsheet exports and JSON APIs, fixtures or seed scripts. The tool runs entirely in your browser, so your data never leaves your device.

02How to use CSV ↔ JSON Converter

  1. Choose the direction with the CSV → JSON or JSON → CSV tab
  2. Paste your data, or in CSV mode click Upload to load a .csv, .tsv or .txt file
  3. Pick the delimiter that matches your data: Comma, Semicolon, Tab or Pipe
  4. Read the result in the output panel, which updates while you edit
  5. Click Copy, or Download to save converted.json or converted.csv

03Worked examples

Input: CSV to JSON, Comma: id,name 1,"Smith, Jo" 2,"say ""hi"""
Result: [ { "id": "1", "name": "Smith, Jo" }, { "id": "2", "name": "say \"hi\"" } ]
Quoted fields keep their commas, a doubled quote becomes one quote, and numbers stay strings.
Input: CSV to JSON, Comma: id,addr 7,"1 Main St Apt 2"
Result: [ { "id": "7", "addr": "1 Main St\nApt 2" } ]
A line break inside quotes stays part of the value.
Input: CSV to JSON, Comma: name,,name 00123,x,y
Result: [ { "name": "00123", "column2": "x", "name_2": "y" } ]
Empty and repeated headers are renamed, and the leading zeros in 00123 are kept.
Input: JSON to CSV, Comma: [{"a":1,"b":"x,y"},{"a":2,"c":true}]
Result: a,b,c 1,"x,y", 2,,true
The header is the union of all keys. Missing values become empty cells. Lines are CRLF in the real output.
Input: JSON to CSV, Comma: [{"id":1,"tags":["x","y"],"meta":{"k":null},"n":null}]
Result: id,tags,meta,n 1,"[""x"",""y""]","{""k"":null}",
Nested values become quoted JSON text and null becomes an empty cell.
Input: JSON to CSV, Semicolon: [{"a":"x;y","b":"he said \"hi\""}]
Result: a;b "x;y";"he said ""hi"""
With a semicolon delimiter, the value containing ; is the one that gets quoted.

04Common use cases

  • Turning a Google Sheets or Excel export into a JSON fixture for unit tests
  • Converting a JSON API response into CSV so a non-developer can open it in a spreadsheet
  • Building seed data for a database script from a CSV that someone else maintains
  • Checking how a CSV with quoted commas and multi-line address cells splits into fields
  • Reading a European export that uses semicolons by switching the delimiter
  • Converting TSV copied from a terminal or database client by picking the tab delimiter

05Tips

  • If every row lands in a single column, the file probably uses semicolons or tabs. Switch the delimiter and the output updates straight away.
  • Values never become numbers or booleans, so leading zeros survive. Cast types in your own code once you know the schema.
  • Nested JSON ends up as JSON text inside one cell. Flatten the objects first if you need separate spreadsheet columns.
  • Switching tabs replaces your input with the sample data. Copy anything you want to keep before you change direction.
  • If you get an unterminated quote error, search the CSV for a cell that opens a quote but never closes it.

06Related concepts

RFC 4180, TSV, Delimiter, Data serialization.

Frequently Asked Questions

What is CSV ↔ JSON Converter?

CSV ↔ JSON Converter is a free, browser-based developer tool on AIDToolStack. Convert between CSV and JSON with custom delimiters, header detection, and file upload It requires no installation or sign-up and works entirely in your browser.

Is CSV ↔ JSON Converter free to use?

Yes. No sign-up, no fees and no usage cap.

Does CSV ↔ JSON Converter store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Related Tools

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe