CSV to JSON & JSON to CSV Converter — Free Online Tool

Convert CSV to JSON and JSON to CSV bidirectionally in your browser with full RFC-4180 quote handling, custom delimiters, header toggles, and instant download.

100% Client-Side • Your data stays in your browser
How to use & FAQ
Loading tool...

CSV ↔ JSON

Spreadsheets, CRMs, analytics exports, and legacy databases love CSV (Comma-Separated Values), while modern web apps, REST APIs, and NoSQL databases expect JSON. Manually reformatting rows or running ad-hoc scripts every time you need to bridge the two formats wastes time and invites quoting bugs. Our free bidirectional CSV ↔ JSON Converter transforms datasets instantly in either direction right inside your web browser. Unlike naive converters that break whenever a cell contains a comma, line break, or double quote, this tool uses a full RFC-4180 state-machine parser. It supports commas, semicolons (common in European Excel exports), and tab-delimited TSV files, with toggles for header rows and pretty-printed or compact JSON—all 100% client-side so sensitive customer or financial tables never leave your device.

How to Use This Tool

  1. 01 Select your conversion direction at the top: CSV → JSON or JSON → CSV (or click Swap anytime to flip the output back into the input).
  2. 02 Choose the column delimiter matching your file: Comma (,), Semicolon (;), or Tab (\t) for TSV spreadsheets.
  3. 03 Keep "First row is header" checked to map CSV columns into named JSON object keys, or uncheck it to output a 2D array of rows.
  4. 04 When converting CSV → JSON, toggle "Pretty JSON" on for readable 2-space indentation or off for compact single-line output.
  5. 05 Paste your CSV or JSON data into the left editor—or click Load Sample to preview how quoted commas and escaped quotes are handled.
  6. 06 Click Copy Output to copy the converted dataset, or click Download to save a ready-to-use .json or .csv file.

How It Works

For CSV → JSON conversion, a character-by-character RFC-4180 parser walks through the input tracking quoted state. Commas, semicolons, tabs, and line breaks inside double-quoted fields are preserved as part of the cell value rather than splitting columns or rows, and doubled quotes ("") inside quoted strings are unescaped to single double-quote characters. For JSON → CSV conversion, the tool parses your JSON array of objects (or 2D array), computes the union of all keys across every record so sparse objects never drop columns, and quotes any cell that contains the active delimiter, a quote mark, or a newline. Everything executes synchronously in browser memory with zero server uploads.

Practical Examples

Converting an Exported Contact List (CSV → JSON)

Input
                      name,email,city
Ana Silva,[email protected],"Lisbon, PT"
Carlos Ruiz,[email protected],Madrid
                    
Output
                      [
  {
    "name": "Ana Silva",
    "email": "[email protected]",
    "city": "Lisbon, PT"
  },
  {
    "name": "Carlos Ruiz",
    "email": "[email protected]",
    "city": "Madrid"
  }
]
                    

Notice how "Lisbon, PT" stays intact as a single city value instead of splitting into an extra column because the parser respects RFC-4180 quoting.

Handling Semicolon-Delimited European Excel CSV

Input
                      sku;price;stock
A-101;19,90;42
B-205;49,50;8
                    
Output
                      [{"sku":"A-101","price":"19,90","stock":"42"},{"sku":"B-205","price":"49,50","stock":"8"}]
                    

Switching the delimiter to Semicolon (;) cleanly parses spreadsheets exported from Portuguese, Spanish, or German locales where commas are decimal separators.

Exporting API Records to Spreadsheet (JSON → CSV)

Input
                      [{"id":1,"title":"Pro Plan","note":"Includes \"Priority\" support"},{"id":2,"title":"Free Plan"}]
                    
Output
                      id,title,note
1,Pro Plan,"Includes ""Priority"" support"
2,Free Plan,
                    

Missing keys on the second object automatically become empty cells, and embedded quotes are properly escaped as doubled quotes for Excel and Google Sheets.

Tips & Best Practices

  • If Excel exported your CSV with semicolons instead of commas, change the Delimiter dropdown to Semicolon (;) before copying.
  • Uncheck "First row is header" when converting raw matrices or coordinate tables that do not have column names.
  • Use the Swap button to round-trip test your data and verify that special characters and quotes survive intact.
  • When converting nested JSON objects to CSV, nested values are safely serialized as JSON strings inside their cell so no data is lost.
  • Because conversion happens locally in your browser, you can safely convert confidential payroll, CRM, or analytics exports without uploading them.

Frequently Asked Questions

Is my CSV or JSON data uploaded to a server?

No. Every conversion runs 100% locally in your browser using JavaScript. Your spreadsheet or API records never leave your device.

How does the tool handle commas and line breaks inside CSV cells?

Following the RFC-4180 standard, any field wrapped in double quotes can safely contain delimiters, newlines, and escaped double quotes ("").

Why does my Excel CSV use semicolons instead of commas?

In many regions (such as Brazil, Portugal, Spain, and much of Europe), the comma is used as a decimal separator, so Excel defaults to semicolon-separated CSVs. Simply select Semicolon (;) in the delimiter menu.

What happens if JSON objects in an array have different keys?

When converting JSON → CSV, the tool collects the union of all keys across every object in the array and leaves blank cells where an object does not define a particular key.

Can I convert TSV (Tab-Separated Values) copied directly from Google Sheets or Excel?

Yes! Copying cells from Excel or Google Sheets places tab-separated text on your clipboard. Select Tab (\t) as the delimiter and paste directly into the CSV Input box.

Related Tools