CSV to JSON Converter

Paste CSV with a header row and get a JSON array of objects back — quoted fields, commas inside values and all. Copy it or download it as a .json file. Nothing is uploaded.

What this converter does

Spreadsheets are where data gets collected — registrations, inventory, exports from a shop or a mailing list — but software increasingly wants that same data as JSON. This tool performs the translation in the obvious, predictable way: the first row of your CSV becomes the set of property names, and each remaining row becomes one JSON object, collected into a single array. Paste the CSV, press the button, and you get clean, consistently indented JSON you can copy into a project or download as a file. The conversion runs entirely in your browser, which makes it safe for the kind of CSV files that should never be casually uploaded — customer lists, order exports, anything with names and addresses in it.

It is worth knowing what you are getting: every value in the output is a string. "36" stays "36". That is a deliberate choice, not a limitation of effort. CSV has no concept of types — a spreadsheet cell does not record whether its contents are a number, a date or text that merely looks numeric — so a converter that guesses will eventually guess wrong in a way that damages data: ZIP codes losing their leading zero, sixteen-digit IDs being rounded by floating-point arithmetic, phone numbers turning into scientific notation. Keeping everything a string preserves your data exactly; the program that consumes the JSON knows which fields are truly numeric and can convert those, and only those, with full knowledge of what they mean.

Quoted fields: where simple converters break

The CSV format allows any field to be wrapped in double quotes, and inside quotes, commas, line breaks and even the quote character itself (written doubled, as "") are just data. Real exports use this constantly: names like "Smith, John", addresses spread over two lines, product descriptions full of punctuation. A converter that simply splits each line on commas — and a surprising number of quick online tools do exactly that — shatters every such row into phantom columns. This tool uses a proper character-by-character CSV parser, so a quoted field survives intact however much punctuation it contains, and both Windows-style (CRLF) and Unix-style line endings work. If your source is Excel or Google Sheets, its export already follows these rules, and this converter honors the same rules on the way in.

Untidy input, handled politely

  • Blank lines are skipped, including the empty line many editors leave at the end of a file.
  • Ragged rows: if a data row has fewer cells than the header, the missing properties are filled with empty strings so every object in the array has an identical shape — the thing JSON consumers expect.
  • Stray spaces: spaces around headers and values are trimmed, so name , age still yields clean "name" and "age" keys.
  • Header-only files produce a clear "no data rows" message instead of a confusing empty result.

One related caution: if your CSV uses semicolons as separators — the default in some European spreadsheet locales — this converter will treat each line as a single field. Open the file, check the separator, and if needed use your spreadsheet's export options to produce a comma-separated file first.

Round-tripping with the JSON to CSV tool

This converter is the mirror image of our JSON to CSV Converter, and the two are designed to round-trip: convert a JSON array to CSV, then convert it back, and you get the same records with the same keys — with values as strings, per the type choice explained above. That makes the pair handy for a common workflow: pull JSON from an API, open it as CSV to inspect or clean it in a spreadsheet, then bring the edited version back as JSON for the application. If the JSON will be consumed by another program, run it through the JSON Formatter afterward to confirm it parses and to eyeball the final structure.

Frequently asked questions

Does the CSV need a header row?

Yes. The first row is treated as the property names, and every following row becomes one JSON object using those names. A CSV without headers would produce meaningless keys, so export from your spreadsheet with the header row included.

Are numbers in the CSV converted to JSON numbers?

No — every value becomes a JSON string. CSV itself carries no type information, and guessing would corrupt values like phone numbers, ZIP codes with leading zeros, and long IDs. If your application needs numbers, convert the specific fields in code where you know which ones are safe.

What if a value contains a comma?

That is normal CSV: the field should be wrapped in double quotes, like "Smith, John", and this converter parses quoted fields properly, including escaped quotes and even line breaks inside a quoted value. Files exported from Excel or Google Sheets already follow these rules.

What happens with blank lines or missing cells?

Blank lines are skipped. If a row has fewer cells than the header row, the missing properties are filled with empty strings so every object in the output has the same shape.

Private by design: this converter runs entirely in your browser. CSV you paste here is never uploaded, stored or shared.