CSV to JSON Converter & JSON to CSV Online

CSV to JSON Converter & JSON to CSV Online

Paste or upload a CSV (comma, semicolon, tab or pipe) and get clean JSON. Also converts JSON to CSV that Excel opens without garbled characters.

Updated November 2026

Reviewed by Rafael Duarte

Shift + Enter to Copy
Delimiter
detected: comma
Output
CSV Input
JSON Output
20 lines · 308 chars

How to convert CSV to JSON

One converter, two directions — CSV to JSON or JSON to CSV

1. Pick a direction

Switch between CSV → JSON and JSON → CSV with the toggle at the top.

2. Paste or upload your file

Paste data directly, or upload a .csv, .tsv or .txt file (CSV → JSON) or a .json file (JSON → CSV). The file is read in your browser.

3. Configure and export

Set the delimiter, Has Headers, the ARRAY or OBJECT output and Infer Types, then copy the result or download it as output.json or output.csv.

What this CSV to JSON converter does

Real-world CSV quirks, handled automatically

Automatic delimiter detection

With Auto-detect, the tool counts commas, semicolons, tabs and pipes in the first line and shows the result as "detected: …". One delimiter is used for the whole file, and you can pick it by hand if the header row misleads the detection.

Quoted fields handled correctly

Commas and line breaks inside quoted CSV fields don't break the parsing.

Optional type inference

When enabled, turns "42" into the number 42 and "true" into a boolean, while leading zeros such as 00184 stay text, so ZIP codes and IDs survive.

Nested JSON flattening

{"user":{"name":"John"}} becomes the user.name column when converting JSON to CSV.

Excel-friendly encoding

An uploaded file that isn't valid UTF-8 is read as Windows-1252, common in CSV files saved by Excel on Windows, so accented characters come through intact. The downloaded CSV starts with a UTF-8 BOM, so Excel opens it with the right characters.

Array or object output

Get an array of row objects (ARRAY) or one object keyed by the first column's value (OBJECT), handy for lookups by ID.

Examples

What goes in, what comes out

Input
Output
CSV: name,age\nJohn,30
JSON (indented): [{"name":"John","age":"30"}]
Same CSV, OBJECT output
JSON: {"John":{"name":"John","age":"30"}}
JSON: {"user":{"name":"John"}}
CSV column: user.name
Infer Types on: "42"
JSON: 42 (number, not string)
Infer Types on: "00184"
JSON: "00184" (leading zeros kept)

When you'll reach for this tool

The most common scenarios people use it for

Feed spreadsheet data into a REST API

Convert CSV to JSON to import records into MongoDB, Firestore or any JavaScript app.

Export an API response to Excel

Convert JSON to CSV to share structured data with non-technical teammates or analysts. The downloaded file carries a UTF-8 BOM, so it opens in Excel with the right characters on a double-click.

ETL and data pipelines

Convert a sample to check the structure before you write the real parser. For files too big for a browser tab, see Large CSV in JavaScript: Convert to JSON Without Freezing.

Feed BI and dashboard tools

Convert JSON to CSV so Tableau, Power BI or Looker can ingest it directly.

Common mistakes

CSV with no header row

Uncheck "Has Headers" if your CSV has no header line — otherwise the first data row is treated as column names.

Wrong delimiter from European Excel exports

Excel in many European locales exports CSV with semicolons instead of commas. Auto-detect handles this case, and in JSON → CSV you can choose Semicolon (;) as the output delimiter for the same audience.

Duplicate keys in OBJECT output

OBJECT output uses the first column as the key. If two rows share that value, the later row overwrites the earlier one with no warning, so use ARRAY unless the first column is a unique ID.

Expecting arrays to become columns

Nested objects are flattened at any depth (a.b.c), but arrays are not — they are stored as a JSON string in the cell.

Why use this converter

It handles the real-world edge cases of CSV: comma, semicolon, tab or pipe delimiters detected from the header row, quoted fields with embedded commas, escaped "" quotes and line breaks inside values.

It also deals with what Excel does to CSV files: Windows-1252 uploads are decoded without garbled characters, and the CSV you download carries a UTF-8 BOM. How to Import CSV Files Without Corrupting Characters explains why both matter.

Everything runs client-side in your browser. No file is ever uploaded to a server, which matters when you're converting spreadsheets or API payloads with sensitive data. If the JSON is headed into a pipeline, ETL vs ELT and How to work with large files without running out of memory cover the next steps.

Frequently asked questions

CSV is flat and tabular, organized as rows and columns separated by a delimiter. JSON is structured and hierarchical, built from key-value pairs and arrays that can nest inside each other. CSV is the natural fit for spreadsheets, while JSON is the standard format for APIs and web applications.

References

Related Tools