CSV to JSON Converter

Runs 100% in your browser

Convert CSV to clean JSON locally. Parse quoted fields, commas, tabs, semicolons, duplicate headers, numbers, booleans, nulls, nested dot keys, keyed objects, column arrays, or JSON Lines, then copy or download the result.

Private data converter

Turn CSV rows into production-ready JSON

Paste a table or load a CSV file, inspect the parsed rows, choose how values should be typed, and export clean JSON without sending data to a server.

Local only

Step 1

Provide CSV data

Paste mode

Step 2

Choose conversion rules

Delimiter: auto
Value and key handling

Step 3

Inspect and export

Waiting for data
Rows
Columns
Delimiter
Output bytes

Load or paste CSV to preview rows.

CSV is parsed and converted entirely in your browser. No file, row, or output is uploaded or stored.

Built for real developer data

Quoted commas, escaped quotes, embedded line breaks, tabs, semicolons, missing cells, duplicate headers, numeric values, booleans, nulls, JSON Lines, keyed records, and column arrays are handled locally. Review the preview before exporting data into an API, database, or application.

Frequently asked questions

A CSV to JSON converter transforms rows and columns from a comma-separated values file into structured JSON. With a header row, each column name becomes an object key and each following row becomes a JSON record that applications, APIs, and databases can consume directly.

Yes. ToolsSonic parses pasted CSV and local files entirely in your browser using JavaScript. The converter does not upload the input, store it in localStorage, or send rows to a conversion API. This makes it safe for internal data, client exports, and confidential spreadsheets.

Yes. The parser recognizes RFC 4180 quoted fields, escaped double quotes written as two consecutive double quotes, embedded commas, and line breaks inside a quoted cell. This handles CSV exports from Excel, Google Sheets, and most database tools without errors.

You can auto-detect or manually select comma, semicolon, tab, pipe, and a custom one-character delimiter. European CSV files commonly use semicolons because commas are used as decimal separators — just select semicolon or auto-detect and the converter handles it correctly.

Yes. Turn off the first-row-contains-headers option and the converter creates generated keys such as column_1, column_2, and column_3. If your first row contains field names, keep the header option enabled for readable, meaningful JSON keys.

Yes. Type inference converts numeric strings to JSON numbers and true or false strings to JSON booleans. You can also convert empty cells to null. Disable type inference when every value must remain a string, such as product IDs or order numbers that contain leading zeroes.

Four formats are available: array of objects (the most common format for REST APIs and JavaScript), objects keyed by a selected column (useful for lookup tables), column arrays (one array per field, useful for charting libraries), and JSON Lines or NDJSON (one JSON object per line, useful for streaming, logging, and MongoDB imports).

Yes. Enable the nested dot keys option to turn column headers such as user.name and user.email into a nested user object containing name and email properties. This is useful when importing CSV into a document database or an API that expects nested payloads.

Export your spreadsheet as CSV from Excel (File → Save As → CSV) or Google Sheets (File → Download → CSV). Then drag the file into the ToolsSonic converter or click Upload file. The converter reads the file locally, shows a live table preview, and generates JSON you can copy or download.

Keep the duplicate-header normalization option enabled to receive unique keys such as email and email_2. If duplicates are accidental, fix the source spreadsheet before using the JSON in production so downstream code has stable and predictable field names.

An array-of-objects output is one valid JSON document with all records inside square brackets — suitable for REST APIs, fetch requests, and JavaScript arrays. JSON Lines writes one independent JSON object per line with no surrounding array — suitable for streaming processors, log pipelines, MongoDB mongoimport, and command-line tools like jq.

Yes. Either select Tab from the delimiter dropdown or use Auto-detect, which recognises tab-separated values automatically. TSV files exported from databases, Excel, or BI tools convert to JSON the same way as standard CSV files.

The parser follows RFC 4180, so a quoted field like "Smith, John" stays one value, escaped quotes are honoured, and line breaks inside quotes do not split rows — the cases that break naive converters.

Four: an array of objects (the default for APIs), an object keyed by a chosen column, per-column arrays for charting libraries, and JSON Lines (NDJSON) for tools like mongoimport and jq.

Yes. Type inference turns 42 into a number and true into a boolean, and can map empty cells to null. Disable it when codes with leading zeroes or phone numbers must stay strings.

Yes. With dot-key nesting enabled, headers like user.name and address.city produce nested objects instead of flat keys.

Yes — save the sheet as CSV from Excel or Google Sheets first, then convert. Quoted commas and line breaks from spreadsheet cells are handled correctly.

Everything runs locally in your browser with no upload, no account, and no logging. You can confirm in your browser DevTools Network tab that no request carries your data.

What is CSV to JSON Converter?

A CSV to JSON converter transforms tabular comma-separated values into structured JSON that applications, REST APIs, databases, and JavaScript code can consume directly. Every developer eventually faces the same problem: a spreadsheet export, a database dump, or a data pipeline output arrives as CSV, but the destination system — a Node.js API, a MongoDB collection, a React component, or a Python script — expects JSON. A reliable converter bridges that gap in seconds, without writing a custom parser for every edge case.

ToolsSonic's free CSV to JSON converter handles the full real-world complexity that basic converters miss: RFC 4180 quoted fields with embedded commas, escaped double quotes (""), newlines inside quoted cells, CRLF and LF line endings, semicolon and tab delimiters (common in European and database exports), duplicate column headers, leading-zero values, missing cells, and BOM characters from Excel exports. It runs entirely in your browser — no file is uploaded, no server sees your data, and no account is required.

Common use cases

  • Converting Excel or Google Sheets CSV exports to JSON for a REST API or JavaScript fetch request
  • Transforming semicolon-delimited European CSV files (prices, addresses, ERP exports) to JSON
  • Building MongoDB documents from CSV database exports using JSON Lines (NDJSON) output
  • Creating JSON test fixtures and seed data from CSV test datasets without writing a parser
  • Converting TSV (tab-separated) exports from BI tools, databases, and analytics platforms to JSON
  • Building nested JSON from flat CSV using dot-key headers like user.name and user.email
  • Generating keyed JSON lookup tables from CSV by indexing records on a unique ID column

Why use ToolsSonic's CSV to JSON Converter?

Most CSV to JSON tools online — convertcsv.com, csvjson.com, and json-csv.com — either upload your data to their servers, fail on quoted commas, support only one output format, or show ads on every page. ToolsSonic delivers a complete converter that beats them on every dimension.

RFC 4180 parser: The converter handles quoted fields containing commas, escaped quotes, and embedded newlines correctly — the same edge cases that break naive split-based converters. Paste a CSV exported from Excel with addresses containing commas in the street line, or product descriptions with embedded line breaks, and it parses cleanly.

Four output formats for every use case: Array of objects is the default — the right format for REST API payloads, JavaScript fetch() bodies, and JSON.parse() in any language. Keyed by column creates a lookup object indexed by a unique field such as id or sku — perfect for fast client-side lookups. Column arrays produce { "name": [...], "email": [...] } — the format used by charting libraries like Chart.js, D3, and Plotly. JSON Lines (NDJSON) writes one record per line — the format accepted by MongoDB mongoimport, AWS Firehose, Elasticsearch bulk API, and command-line tools like jq and mlr.

Type inference you can trust: Numbers stay numbers, true/false become JSON booleans, and empty cells can optionally become null — all toggleable. Disable inference when you need product codes with leading zeroes, phone numbers, or postal codes to remain strings.

Nested JSON from dot-key headers: Enable dot-key nesting and a CSV with columns user.name, user.email, address.city produces deeply structured JSON objects — no post-processing needed.

Privacy you can verify: Open DevTools → Network tab, paste a CSV with real customer data, and click Convert. You will see zero outbound network requests. The file never leaves your device.

100% private — runs in your browser Instant — no server round-trip Free forever — no account needed