CSV to JSON Converter

Convert CSV live to object or row arrays with optional root wrapping, safe type inference and JSON export.

Up to 1 MB and 100,000 characters. You can also paste or edit text below.
Wrap the result array in an object with this exact key. Leave blank for an ordinary JSON array.
Conversion options
Without headers, object keys are column1, column2, and so on.
Leading-zero values and integers outside the safe number range stay as text.

Files and text are processed locally in your browser and are not uploaded.

Records
2
Columns
2
Delimiter
Comma
Page guide

How to use this tool

  1. Upload a CSV, TSV or TXT file, or paste the table.
  2. Choose the delimiter, review header and value-type options, and optionally enter a top-level property name.
  3. Valid input updates after a brief typing pause. You can also use the main action button. Resolve errors before copying or downloading.
  4. Clear input keeps the conversion settings; Undo input change restores the previous inputs after clear or reverse. Reset restores the example and default settings.

Understanding the output

By default, the first row supplies trimmed object keys and every data cell remains a string. The result shows the record count, column count and delimiter. Choosing row arrays removes object keys; turning off column names includes the first row as data and uses column1, column2 and so on for objects.

Preserving an identifier

The CSV id,name followed by 001,Ada becomes an object with "id": "001" and "name": "Ada". The leading zeroes remain because the converter does not turn 001 into a number. For name followed by Ada on a new line, the root name rows produces {"rows":[{"name":"Ada"}]} in compact mode.

Headers, empty lines and consistent columns

Object output requires nonempty, unique column names after trimming. Every data row must have the same number of fields as the first retained row. A missing final value needs a trailing delimiter. Error row numbers refer to CSV records, so a quoted field spanning multiple lines counts as one record.

Skip empty lines ignores completely empty records, including leading empty lines. A row containing delimiters, quoted empty cells or spaces remains a data row. Trimming cell values is a separate option and is off by default.

Choosing the right delimiter

Automatic detection compares comma, semicolon, tab and pipe separators across up to 20 records, ignoring separators inside quoted fields. The detected separator appears beside the record count. When a file contains several plausible separators, choose the delimiter explicitly. A single-column file defaults to comma.

Quoted fields can contain separators, line breaks and escaped double quotes. The parser reads these as one cell and turns doubled double quotes into a literal quote. Changing the delimiter preserves this quoting behavior.

Preserve text or convert value types

Keep every value as text is the default. It preserves leading-zero identifiers, empty cells, dates and number-like strings without guessing their meaning.

Optional type conversion recognizes JSON-style numbers and the lowercase words true, false and null. Leading-zero values, nonfinite numbers and integers outside the safe JavaScript range remain strings. Decimal numbers use JavaScript numeric precision; retain text when every original digit matters. Trimming happens before type conversion when both options are enabled.

Method and supported input

A stateful parser handles the selected separator, quoted fields, escaped quotes and CRLF or LF record endings. Retained rows become objects or arrays, then JSON serialization applies the selected indentation.

Files are read locally as UTF-8, or as UTF-16 when a little-endian or big-endian byte-order marker is present. A leading byte-order marker is removed. Downloads contain UTF-8 JSON and use the imported filename with a .json extension.

A nonempty top-level name wraps the complete result array under one literal own property; it does not create a nested path. Row and column counts continue to describe the converted table.

  • The default input has column names in the first row; turn that option off for headerless data.
  • Files contain delimited text, rather than an Excel workbook.

Limitations

  • Input is limited to 100,000 characters, 10,000 CSV records including the header and empty records, and 200 columns. File import is limited to 1 MB.
  • Delimiter detection is a heuristic; inspect the selected delimiter and use an explicit setting when needed.
  • XLS/XLSX, ZIP and other binary formats are not supported. Save the table as CSV or TSV first.

Common questions

Can I upload a CSV file instead of pasting it?

Yes. Choose a CSV, TSV or TXT file. Its text appears in the editable input and converts using the current settings. Files stay in your browser.

Can I convert semicolon-separated CSV or TSV?

Yes. Automatic detection supports commas, semicolons, tabs and pipes, and you can choose any of these explicitly.

Why does 001 remain a string when type conversion is enabled?

Leading-zero values may be identifiers. They stay strings, as do integers outside the safe JavaScript number range. Ordinary numbers and lowercase true, false and null can be converted.

What if my CSV has no header row?

Turn off First row contains column names. Object output uses column1, column2 and so on. Array output contains only cell values.

Can I download compact JSON?

Yes. Select Compact JSON under Conversion options, convert again, and use Download JSON. The same output is available through Copy output.

Sources and further reading

Reviewed on