All tools run in your browser — your files never leave your device.
All tools154

Developer & Security

CSV to JSON Converter

Convert CSV to JSON and back, with a table view and type detection.

What it does. A CSV to JSON converter turns tabular rows into an array of objects keyed by the header row, and back again. This tool detects the delimiter, infers types, handles quoted fields containing commas and newlines, and previews the result as a sortable table. There is no row limit and nothing is uploaded.
Runs in your browserNothing uploadsNo signupWorks offline

How to use CSV to JSON Converter

  1. Paste CSV or drop a .csv file — the delimiter is detected automatically.
  2. Review the table preview and adjust the header, delimiter and type-inference options.
  3. Copy the JSON, or switch direction to convert JSON back to CSV.

Why CSV parsing is harder than splitting on commas

CSV has no single specification. RFC 4180 describes one dialect; Excel, Google Sheets and every database export deviate from it in small ways. Four cases break naive parsers, and all four appear in real exports.

  • Commas inside quoted fields. "Smith, John",42 is two fields, not three. Splitting on commas gives the wrong answer on any dataset containing a name, an address or a description.
  • Newlines inside quoted fields. A multi-line address in one cell means a record spans several physical lines. Reading line by line corrupts everything after it.
  • Escaped quotes. RFC 4180 doubles them: "She said ""hi""". Some exporters use a backslash instead.
  • The delimiter is not always a comma. Semicolons are standard across continental Europe, because those locales use a comma as the decimal separator. Tabs are common in database exports.

This parser handles all four, and reports the delimiter it detected so you can override it when the guess is wrong — which happens on files with very few rows.

Type inference: useful and occasionally destructive

With inference on, 42 becomes the number 42, true becomes a boolean, and empty cells become null. That is usually what you want for an API payload.

It is emphatically not what you want for identifiers. Postal codes, phone numbers, order references and account numbers are strings that happen to look numeric, and converting them destroys data:

01234 becomes 1234 — the leading zero is gone, and half of the UK and US postal code space with it. 1.20E5 becomes 120000. A 20-digit reference exceeds the safe integer range and silently loses precision.

This is the same class of failure as Excel converting gene names to dates — a well-documented problem that led to several human genes being formally renamed. Turn inference off for anything that is an identifier rather than a quantity.

Which JSON shape do you need?

Which JSON shape do you need?
ShapeOutputUse for
Array of objects[{"name":"Ada","age":36}]APIs, MongoDB, the usual default
Array of arrays[["Ada",36],["Alan",41]]Compact transport, charting libraries
Column-oriented{"name":["Ada"],"age":[36]}Dataframes, pandas, plotting
Keyed object{"1":{"name":"Ada"}}Lookup by ID
NDJSONOne object per lineStreaming, log pipelines, BigQuery

Array of objects is the right default — it is self-describing, and every consumer understands it. Column-oriented is dramatically more compact for wide tables because the keys appear once rather than per row.

Why convert in the browser?

Because of what is in the file. CSV is the universal export format for exactly the data you should be careful with: customer lists, order histories, employee records, mailing lists, financial exports.

Uploading a customer CSV to a free converter is a transfer of personal data to a third-party processor. Under GDPR and UK GDPR that needs a lawful basis and, in practice, a data processing agreement the site will not offer you. Under CCPA it may constitute a sale or share.

A parser is a few hundred lines of JavaScript. There is no engineering reason for it to run anywhere but your own machine, and doing so removes the compliance question rather than managing it.

Frequently asked questions

Is there a row limit?

No. Files with hundreds of thousands of rows parse fine; the constraint is device memory. The table preview renders the first 500 rows for speed while the conversion covers all of them.

Why did my postal code lose its leading zero?

Type inference converted it to a number. Turn inference off, or exclude that column — postal codes, phone numbers and reference IDs are strings, not quantities.

Does it handle semicolon-delimited files?

Yes, and it detects them. Semicolons are standard in continental Europe because those locales use a comma as the decimal separator.

Can it convert JSON back to CSV?

Yes. Nested objects are flattened with dot notation, and arrays are joined — both are configurable, since CSV has no way to represent nesting natively.

What about Excel files?

Save as CSV from Excel first. The .xlsx format is a ZIP of XML and needs a different parser.

How are dates handled?

Left as strings by default, because date formats are ambiguous — 03/04/2026 is March 4th in the US and April 3rd almost everywhere else. Guessing would corrupt data silently.

Is my file uploaded?

No. Parsing runs in this page, which is the point for anything containing personal data.

Guides for CSV to JSON Converter