MinifyPic

CSV to JSON

Turn spreadsheet data into a clean JSON array of objects — quoted fields, embedded commas and all.

FreeQuote-awareNo upload
Loading tool…

How it works

A compact workflow from input to download.

1

Paste your CSV

Paste rows copied straight out of Excel, Google Sheets or a .csv file. The first row is treated as the header.

2

Convert

Each column header becomes a key and each row becomes an object in a JSON array.

3

Copy the JSON

Copy the result into your code, your API request or your test fixtures.

Frequently asked questions

Does the first row have to be a header?
Yes — the first row supplies the key names for every object. If your data has no header row, add one before converting, otherwise your first record will be consumed to name the fields.
Are values converted to numbers automatically?
Values that look unambiguously numeric are converted to JSON numbers, and everything else stays a string. Be careful with identifiers that happen to be all digits — a zip code like 02134 or a phone number will lose its leading zero if treated as a number, which is a classic and painful data-loss bug.
Does it cope with commas inside quoted fields?
Yes. Quoted fields are parsed properly, so a value like "Smith, John" stays a single field rather than being split into two columns. This is the main thing that separates a real CSV parser from a naive split on commas.
Is my data sent to a server?
No. Everything runs in JavaScript inside your own browser tab — nothing is uploaded, logged or stored. That is what makes it safe to paste in API responses, config files, tokens and other material you could not send to a third-party service.

CSV is not as simple as it looks

Everyone's first instinct is to parse CSV by splitting each line on commas, and that approach breaks on real data almost immediately. Values legitimately contain commas — 'Smith, John' is one field, not two — so they get wrapped in quotes. Values contain quotes, so those get escaped by doubling. Values contain line breaks, so a single record can span multiple physical lines, which means you cannot even reliably split the file into records by newline. Add the fact that CSV was never formally standardised until 2005, long after everyone had already implemented their own variant, and you have a format that is trivial to read by eye and genuinely fiddly to parse correctly. This is why you should always use a real parser rather than a split.

The type-inference trap

CSV has no types — every cell is just text — and JSON does, so converting between them forces a guess. Usually the guess is helpful: the string '42' becomes the number 42, which is almost certainly what you meant. Sometimes the guess is catastrophic. A US zip code stored as 02134 becomes the number 2134, and the leading zero is gone forever. A phone number, a product SKU, a bank account, an ISBN — all of these look numeric and none of them are numbers, because you would never do arithmetic on them and their leading zeros are meaningful. Anyone who has watched Excel eat the leading zeros from an entire column of identifiers knows exactly how expensive this is. Where a field is an identifier rather than a quantity, keep it a string.