CSV to JSON

Convert CSV to JSON online. Paste or upload, set delimiter and first row as keys. Download or copy. 100% client-side.

Related Tools

What This CSV to JSON Tool Offers

This free CSV to JSON converter runs in your browser. Paste CSV or upload a file, choose delimiter (including auto-detect) and encoding, and get JSON as an array of objects (first row as keys) or an array of arrays. Download the JSON file or copy it to the clipboard.

  • Auto or custom delimiter: Choose Auto to detect comma, semicolon, tab, or pipe from the first line, or set the delimiter explicitly for full control.
  • Encoding for file upload: When you upload a file, select UTF-8, Windows-1252, or ISO-8859-1 so CSVs from different regions or legacy systems are read correctly.
  • First row as keys: When enabled, the first CSV row becomes the keys for each object in the JSON array. When disabled, output is an array of row arrays.
  • Paste or upload: Paste CSV directly into the text area or upload a file via drag-and-drop or file picker.
  • Download and copy: Download the result as a .json file or copy the JSON to the clipboard in one click.
  • Prettified output: JSON is output with indentation so it’s easy to read and validate.
  • Quoted fields: The parser handles quoted fields and escaped double quotes inside CSV values correctly.
  • Client-side and private: Conversion happens in your browser; nothing is sent to a server.

Why Convert CSV to JSON?

JSON is the standard format for APIs, configs, and many programming languages. Converting CSV to JSON lets you feed spreadsheet data into web apps, scripts, or APIs.

  • APIs and web apps: Many APIs expect JSON. Converting CSV to JSON lets you use spreadsheet data in REST APIs or front-end code.
  • Config and code: JSON is easy to embed in code or config files. Use “First row as keys” for a clear array of objects.
  • No server: Conversion runs in your browser, so sensitive data never leaves your device.

How CSV to JSON Conversion Works

Your CSV text or file is parsed with the chosen delimiter and encoding. If “First row as keys” is on, the first row becomes the keys and each following row becomes an object; otherwise each row becomes an array. The result is serialized as prettified JSON.

  • Input: Paste CSV into the text area or upload a file (with optional encoding). The parser respects quoted fields and escaped quotes.
  • Delimiter: Auto detects the delimiter from the first line, or you choose comma, semicolon, tab, or pipe.
  • Output shape: With “First row as keys”, output is [{ key1: val1, key2: val2 }, ...]. Without it, output is [[val1, val2], ...].
  • Download or copy: Download the JSON as a file or copy it to the clipboard. All processing is client-side.

Options Explained

These options control how the CSV is read and how the JSON is built.

  • Delimiter (Auto or manual): Auto detects the separator from the first line (comma, semicolon, tab, or pipe). Choose a specific delimiter when Auto doesn’t match your file.
  • Encoding (file upload): UTF-8 is the default. Use Windows-1252 or ISO-8859-1 for CSVs that show wrong characters (e.g. accented letters) when read as UTF-8.
  • First row as keys: When enabled, the first row becomes the property names for each object. When disabled, the output is an array of arrays, one per row.

When to Use Each Delimiter

Use Auto for most files. If the result looks wrong, set the delimiter explicitly.

  • Comma: Standard for CSV in English locales and most exports. Auto usually detects it.
  • Semicolon: Common in European locales where comma is the decimal separator. Use when your CSV uses semicolons between fields.
  • Tab: Used for tab-separated values (TSV). Choose Tab when your “CSV” is actually TSV.
  • Pipe: Often used in data pipelines. Choose Pipe when fields are separated by |.

Powered by browser APIs and client-side processing.

Frequently Asked Questions

What delimiters are supported?

You can use Auto to detect the delimiter from the first line, or choose comma, semicolon, tab, or pipe. Auto works for most CSVs.

What does “First row as keys” do?

When enabled, the first row of the CSV becomes the property names for each object in the JSON array. When disabled, the output is an array of arrays (each row is an array of values).

What encoding is used for file upload?

You can select UTF-8 (default), Windows-1252, or ISO-8859-1 when uploading a file. Use Windows-1252 or ISO-8859-1 if the file shows wrong characters with UTF-8.

Is my data secure?

Yes. Conversion runs entirely in your browser. Your data never leaves your device and is not uploaded to any server.

Can I copy the JSON instead of downloading?

Yes. After converting, use the “Copy JSON” button to copy the result to your clipboard for pasting into another app or code.