Convert CSV to JSON

Converting CSV to JSON here gives you an array of objects, using the header row as the keys — the shape most APIs and test fixtures expect. Quoted fields and embedded commas are parsed correctly, numeric values become real numbers, and the whole thing runs in your browser, so a customer export never leaves your machine.

  • Where it runs In your browser. The file is never uploaded.
  • Lossless Nothing is discarded. The JSON holds exactly what the CSV held.
  • File size limit Up to 100 MB per file, free, without an account.

Up to 100 files at once. Mixed formats are fine.

Why convert CSV to JSON at all

CSV is what every database, spreadsheet and analytics tool exports, and JSON is what every API, test fixture and configuration file expects. The gap between them is small and tedious, which is exactly the kind of gap worth having a tool for rather than writing a throwaway script each time.

The output: an array of objects keyed by the header row

The header row supplies the keys and every following row becomes one object — the shape almost everything downstream assumes. Quoted fields, escaped quotes and newlines inside a cell are parsed properly, so a CSV containing commas in an address field survives it, which a naive split on commas does not.

Type inference, and where it will bite you

Types are inferred, and that is the part worth checking. Numeric-looking values become JSON numbers and `true`/`false` become booleans, which is nearly always what you want for quantities and flags.

It is the wrong answer for identifiers. `007` becomes `7`, and a postcode, a part number or a zero-padded account reference loses its leading zeros silently. If your data contains codes rather than quantities, look at the output before you rely on it — this is the single most common way a CSV to JSON conversion produces valid JSON and wrong data.

Converting a customer export without uploading it

The whole thing runs in your browser, so a large export converts as fast as your machine allows and never leaves it. That matters more for this pair than for most: a CSV is very often a customer list, an order history or an export from a system somebody would rather not describe to a third party.

Keeping identifiers as strings

Since numeric-looking values become numbers, the defence for a column of codes is to make it unambiguous before converting: a leading apostrophe in the spreadsheet, a prefix, or exporting the column already quoted all mark it as text.

The general rule is worth internalising. If you would never add two values in a column together, it is an identifier and it wants to stay a string. Postcodes, part numbers, phone numbers and account references all fail the addition test.

Empty cells, and what they become

An empty cell becomes null, not an empty string. A row reading 1,,3 under headers a,b,c arrives as {"a":1,"b":null,"c":3}, and that is a deliberate consequence of the same type detection that turns 1 into a number rather than "1".

It matters if the consumer distinguishes the two. A JSON Schema demanding a string will reject null; a database column declared NOT NULL will refuse the row. A CSV cannot express the difference between a field that was empty and one that was absent, so if that distinction carries meaning it has to be encoded explicitly in the source or restored afterwards. No converter can recover information the source format cannot carry.

Duplicate and missing header names

Two columns sharing a header do not collide, which is the better outcome and still worth knowing about: the parser renames the second, so headers a, b, a produce the keys a, b and a_1. Nothing in the download says it happened, and a_1 appearing in your objects is the sign that the header row needed a glance.

A header row shorter than the data rows does not leave those values unnamed either. The surplus from each row is collected into one `__parsed_extra` array on that object, in the order the fields appeared. Fix the header in the CSV — it is a one-line change, and it is the only place that information exists.

How large a file this handles

The parse is fast and the limit is memory, because the whole array is built before it is written. Tens of megabytes is routine; hundreds is where a browser tab begins to strain.

For an export in that range the right tool is a streaming parser in a script rather than any browser-based converter. Saying so is better than failing halfway through a 900 MB file.

The shape you get, and the shapes you do not

The output is an array of objects, which is what APIs, test fixtures and most libraries expect. It is not newline-delimited JSON, and it is not an object keyed by an ID column.

Both of those are a few lines of transformation away once you have the array, and neither can be chosen for you without knowing which column is the key. An array is the shape that assumes least.

How to convert CSV to JSON

  1. Drop your CSV onto this page, or click to choose one.
  2. It parses and converts in your browser.
  3. Download the JSON.

CSV vs JSON: rows of text against structured data

CSV compared with JSON
CSVJSON
Full nameComma-Separated ValuesJavaScript Object Notation
File extension.csv.json
Media typetext/csvapplication/json
First published19722001
SpecificationRFC 4180RFC 8259
LicensingOpen standardOpen standard
Standing todayCurrentCurrent
Opens in a browserNo browserEvery browser
Considered insteadXLSX, ParquetXML, YAML, NDJSON

What survives

Nothing is discarded. CSV and JSON both store their content losslessly, so the conversion is a change of packaging rather than a change of quality, and it can be repeated without accumulating damage.

Opening the result

JSON opens in every current browser. CSV has narrower browser support than that. If the file is going onto a web page or into a form, that is usually the whole reason for the conversion.

The usual programs do not overlap: CSV opens in Microsoft Excel, LibreOffice Calc and pandas, JSON in Visual Studio Code, jq and Postman — so whoever receives the result needs something from the second list.

What each format is for

CSV was published in 1972. The specification is RFC 4180, and it is worth reading if the file has to outlive the tool that wrote it.

JSON dates from 2001, specified as RFC 8259. Visual Studio Code, jq and Postman all read it.

CSV was published in 1972 and JSON in 2001. The older one is generally the safer file to hand to somebody; the newer one usually does the job in fewer bytes.

CSV to JSON: the questions that matter for real data

Are my CSV files uploaded anywhere?

No. This conversion runs entirely inside your browser, so the file never leaves your device. You can confirm it yourself: open the network tab of your browser's developer tools and convert something. You will see the page load, plus the analytics and advertising the site is paid for with — and nothing carrying your file.

What shape is the JSON output?

An array of objects, with the header row supplying the keys — the shape almost every API, seed script and test fixture expects.

Are numbers converted to real JSON numbers?

Yes. Values that look numeric become JSON numbers rather than strings, and true and false become booleans. That is usually what you want for quantities and flags, and the wrong answer for identifiers.

What happens to leading zeros?

They are lost, because `007` read as a number is `7`. Product codes, postcodes and account references are the usual casualties. If your data has them, check the output before relying on it.

Does it handle quoted fields and commas inside a cell?

Yes. Quoted fields, escaped quotes and newlines inside a cell are all parsed properly rather than split naively on commas, so an address column survives the conversion intact.

Is there a row limit?

None imposed by us. The parser runs on your own machine, so the practical ceiling is your available memory rather than a plan tier or a queue.

More about these formats