Skip to content
HNarzędzia
en
Categories

CSV to JSON and JSON to CSV converter online

Paste data or load a file: the converter detects the delimiter (comma, semicolon, tab or pipe), handles quoted fields correctly and produces a file that opens cleanly in Excel or Google Sheets.

  • Free
  • No sign-up
  • Private
  • Runs locally

Paste data or load a file - the result appears instantly.

How to convert CSV to JSON (or back)

  1. 1.

    Pick a direction

    Switch between “CSV → JSON” and “JSON → CSV”, then paste your data or load a .csv, .tsv or .json file.

  2. 2.

    Set the options

    For CSV input: delimiter (auto-detected by default), header row and type inference. For JSON input: flattening, output delimiter, BOM and decimal comma.

  3. 3.

    Check the preview

    The result and a table preview appear instantly, with the number of rows and columns, so you can spot a wrong delimiter right away.

  4. 4.

    Copy or download

    Copy the output or download it as data.json or data.csv.

CSV rules the parser follows (RFC 4180)

CSV looks simple, but naive “split on comma” code breaks on real exports. This converter implements the rules from RFC 4180 plus the usual real-world deviations:

  • A field that contains the delimiter, a double quote or a line break must be wrapped in quotes: "Doe, Jr.".
  • A quote inside a quoted field is written twice: "she said ""hi""".
  • A quoted field may span several lines, which is common in exported comments or addresses.
  • Rows can end with CRLF (Windows), LF (macOS, Linux) or a bare CR; a trailing empty line is ignored.
  • A UTF-8 byte order mark at the start of the file is removed automatically.

Example: the row John,"Doe, Jr.",25,8.99 with type inference on and no header becomes ["John","Doe, Jr.",25,8.99] - four values, not five.

Delimiter detection and European Excel files

Not every CSV uses commas. Excel follows the list separator of the operating system, so in Germany, France, Poland, Italy and most of continental Europe it saves CSV files with a semicolon, because the comma is the decimal separator there (12,50). Exports from databases often use a tab (TSV) or a pipe. The auto-detection parses the first 30 rows with each candidate and picks the one that gives the most consistent column count greater than one.

When you load a file, the tool first tries strict UTF-8. If that fails, it falls back to Windows-1252, the legacy encoding older Excel versions use in Western Europe and the US, so characters like é, ü or £ are not mangled.

Going the other way, Excel does not always recognise UTF-8. Keep Add BOM on and accented or non-Latin characters will display correctly. If your colleagues use Excel in a European locale, choose the semicolon delimiter and turn on the decimal comma so numbers land in proper numeric cells.

Type inference and flattening nested JSON

By default every CSV value is a string. With type inference on, 42, -3.5 and 1e3 become numbers, true/false become booleans, and empty fields or null become null. Values with leading zeros (007, ZIP codes such as 02134) and very long integers such as card or account numbers stay strings, because converting them would silently lose data.

For JSON → CSV, nested objects can be flattened with dot notation: {"address":{"city":"London"},"tags":["a","b"]} becomes the columns address.city, tags.0 and tags.1. The column list is the union of keys from all records, so records missing a key simply get an empty cell. With flattening off, nested values are written into one cell as JSON text.

The input can be an array of objects, an array of arrays or a single object. Everything is processed locally in your browser, so customer lists and internal exports never leave your computer. For pretty-printing or validating the JSON itself, use the JSON formatter.

Frequently asked questions

Why does my CSV from Excel use semicolons instead of commas?

+
Excel uses the list separator from your regional settings. In many European locales the comma is the decimal separator, so the semicolon separates columns. The converter detects this automatically.

Why do I see garbled characters when I open the CSV in Excel?

+
Excel does not always detect UTF-8. Download the CSV with “Add BOM (Excel)” switched on and accented letters, currency symbols and non-Latin scripts will display correctly.

How do I convert nested JSON to CSV?

+
Turn on “Flatten nested objects”. Nested keys get dot-notation column names such as address.city, and array items get numbered columns such as tags.0 and tags.1.

Will ZIP codes or IDs with leading zeros be changed?

+
No. Values like 007 or 02134 always stay strings, even with type inference on. Very long numbers are kept as strings too, so nothing is rounded.

Is my data uploaded anywhere?

+
No. Parsing and conversion run entirely in your browser. You can safely convert customer data or exports from company systems.

How large a file can I convert?

+
The limit is your browser memory. Files of several megabytes (hundreds of thousands of cells) work fine. The table preview shows the first 50 rows to keep the page fast.

Updated: