CSV ↔ JSON Converter

Convert CSV to JSON arrays/objects and back. Supports custom delimiters, headers, and shows a live table preview.

CSV Input
JSON Output

About CSV to JSON Converter

CSV to JSON Converter transforms tabular CSV data into structured JSON arrays or objects and converts JSON arrays back to comma-separated CSV. It automatically detects and maps the first row as column headers to produce properly keyed JSON objects, and supports comma, semicolon, tab, and pipe delimiters to handle exports from Excel, Google Sheets, PostgreSQL, and other tools.

A live collapsible JSON tree viewer and a scrollable table preview let you verify the converted data at a glance before copying or downloading. The converter also handles quoted fields containing commas or newlines. All conversion happens locally in your browser — your data never leaves your machine.

Common Use Cases

How to Use

  1. Select the direction — "CSV → JSON" or "JSON → CSV" — using the mode toggle at the top.
  2. Paste your CSV or JSON into the Input panel, or click "Load Example" to see sample data.
  3. Adjust options: choose the delimiter that matches your file, toggle "First row is header", and enable or disable pretty-printed JSON output.
  4. Click "Convert", then use "Copy Output" or "Download" to export the result in the format you need.

Frequently Asked Questions

What happens if a CSV field contains a comma or a newline?

The parser follows the RFC 4180 standard and correctly handles fields that are enclosed in double quotes. A field like "Smith, John" is treated as a single value even though it contains the delimiter. Embedded double quotes inside a quoted field must be escaped by doubling them (""), which the parser also handles automatically.

Why does my JSON → CSV conversion fail with "Input must be a JSON array"?

The JSON → CSV mode expects a top-level array of objects, such as [{"name":"Alice"},{"name":"Bob"}]. If your JSON is a single object or is wrapped in a parent key (e.g., {"data":[...]}), you need to extract the array first. Paste the JSON into a text editor, locate the array, copy it, then paste it into this tool.

Is my data sent to any server during conversion?

No. All parsing and conversion logic runs entirely in JavaScript inside your browser tab. Your CSV or JSON data is never transmitted over the network, stored, or logged. This makes the tool safe to use with sensitive internal data such as customer records or confidential exports, as long as you trust the machine you are working on.

Advertisement