Files are read in your browser. Excel sheets become CSV text for review; raw cell values stay as text, so dates may appear as serial numbers.

CSV to JSON

Parse CSV into an array of objects, with optional header row

CSV to JSON: Header Row, Type Conversion and Common Format Breakage

Is the first row a header or data?

The CSV format does not mandate that the first row be a header; that is only a convention followed in most situations. So the tool leaves the decision to you:

ChoiceFirst row handlingResult
as headertaken as key names, produces no data[{"name":"Bob","age":"18"}]
as datadefault key names generated (e.g. col1, col2)the first row also becomes one record

The symptom of a wrong choice is typical: you clearly had 100 rows of data but got 99 records back, or the first record's field values are things like name and age — the column names themselves — meaning the header was treated as data.

Every value is a string — remember this

CSV has no type system; every cell is text. After conversion, "18" is a string, not a number, and "true" is a string, not a boolean. The tool deliberately does no type inference, and the reason is a common counter-example:

Postal codes such as 01234, phone numbers, ID numbers, and any zero-prefixed code. Auto-converting to a number drops the leading zero, turning 01234 into 1234 — an irreversible error that is serious in business terms.

So the right approach is: parse as strings, then convert explicitly where you know the field's meaning. For a number use Number(v); for a boolean, judge against the agreed truthy set (true/1/yes all may appear). Leave type decisions to a schema definition, not a generic text parser.

Common CSV format problems

SymptomCauseHandling
wrong column count, later columns shifteda field with the delimiter but no quotesa source-file problem; fix the export
extra content appears in a fielda newline inside a field not quoted per RFC 4180same; the tool follows the standard and reads one row as two
first column name has a strange prefixthe file has a UTF-8 BOMthe tool skips the BOM automatically
Chinese is garbledthe file is actually GBK or another non-UTF-8 encodingconvert to UTF-8 in an editor before parsing
a trailing empty record appearsa blank line at end of filethe tool ignores trailing blank lines

Confirm the delimiter first

When you save a CSV from Excel, the delimiter depends on the system's regional settings — semicolons are common in Europe, tabs in some regions. If the whole row is crammed into one field, the delimiter is almost certainly wrong. The tool offers comma, semicolon, tab, and pipe; switch and reconvert.

Another case is when the field content itself contains a semicolon (an address or a formula fragment, for instance). Then the chosen delimiter must match what the file actually uses, and the tool splits and recognizes quotes strictly by that delimiter.

How to use this tool

  1. Paste the CSV into the left input box.
  2. Pick a delimiter (when unsure, try comma first and check whether the field count looks reasonable).
  3. Pick whether the first row is a header.
  4. Click convert to get a JSON array of objects.

All parsing happens locally in your browser. For very large volumes (tens of thousands of rows and up) prefer a command-line tool, because in-browser string handling slows down noticeably.

FAQ

A comma inside a cell was split into two columns?

In standard CSV, content with a delimiter must be wrapped in double quotes. If the source did not add quotes, switch to a non-conflicting delimiter such as Tab or Pipe before converting.

Will numbers become strings?

By default everything is kept as a string to avoid mis-converting leading zeros, phone numbers and the like into numbers. Convert in code if you need numbers.