CSV ↔ JSON Converter

Move structured data between CSV and JSON

Found this useful? Share it

X LinkedIn Reddit WhatsApp

About CSV ↔ JSON Converter

This converter turns CSV into a JSON array and back. CSV to JSON reads the first row as column names, so every later row becomes an object keyed by those names. Parsing uses the PapaParse library with a comma delimiter, so quoted fields, commas inside quotes and doubled quotes are handled. Semicolon or tab separated files are not auto-detected and need their delimiters changed to commas first. Fully empty lines are skipped. Every value stays a string, so 007 keeps its leading zeros and 42 becomes "42" rather than a number. Headers must be unique and non-empty, and malformed rows, such as a different number of fields than the header, stop the conversion with a row-numbered error. JSON to CSV expects an array of flat objects. The header row is the union of all keys in first-seen order, and a key missing from a row, or set to null, becomes an empty cell. Nested objects and arrays are rejected until you flatten them. Values that start with = + - @ are prefixed with an apostrophe so spreadsheets will not run them as formulas. For example, name,city then Alex,London converts to a one-item array with name Alex and city London. Input is limited to 500,000 characters, and download names end in .json or .csv.

How to use CSV ↔ JSON Converter

  1. Choose CSV → JSON or JSON → CSV from the Mode menu.
  2. Paste your data into the Your input box, with a header row for CSV or an array of objects for JSON.
  3. Fix any error shown below the boxes, then read the Result.
  4. Press Copy result or Download to get a .json or .csv file.

Frequently Asked Questions

CSV values are kept as strings on purpose, so ZIP codes, phone numbers and IDs with leading zeros are not damaged. Convert types in your own code if you need real numbers or booleans.

No. The delimiter is fixed to a comma. Replace semicolons or tabs with commas in a text editor first, taking care not to break fields that already contain them.

An array of flat objects, such as [{"name":"Alex"}]. Nested objects, nested arrays, and a top-level object or plain value produce an error asking you to flatten the data.

The CSV gets one column for every key found in any row, in the order first seen. Rows that lack a key get an empty cell for that column.

Values beginning with =, +, - or @ can run as formulas in Excel or Sheets. The converter adds a leading apostrophe to block that, so remove it if you are sure the data is safe.

JSON objects cannot hold two keys with the same name, so each CSV column name must be unique and non-empty. Rename the repeated or blank headers and convert again.