SimplifyConvert free online tools logo
HomeData ToolsCSV to JSON
📊

CSV to JSON

Convert CSV files to a JSON array of row objects

structured

Convert

Click to select

.csv

Options

About this tool

Convert CSV files to a JSON array of row objects

Input: .csv
Output: .json

Ready to convert

Select a file and click Convert to get started

Convert tabular CSV rows into a JSON array

Upload one CSV file and choose its delimiter to download a UTF-8 JSON array of row objects with two-space indentation. The first parsed row supplies headers. The pandas parser infers value types, so review identifiers, missing values, and generated keys before importing the result.

Where row-oriented JSON helps

  • •Prepare spreadsheet exports for an API import.
  • •Inspect CSV records as named JSON fields.
  • •Move a flat table into a JavaScript-friendly exchange format.

How to use this tool

  1. 1.Upload one .csv file up to 100 MB.
  2. 2.Choose the delimiter actually used by the file: comma, semicolon, tab, or pipe.
  3. 3.Convert, then inspect header names, inferred values, missing fields, and row count before using the JSON.

Parsing rules to check

  • The server uses pandas read_csv with the selected comma, semicolon, tab, or pipe delimiter. Quoted delimiters, doubled quotes, and quoted multiline fields follow its CSV parsing rules; blank lines are skipped.
  • Column names come from the first parsed row. Duplicate names can receive numeric suffixes, and blank names can become Unnamed columns. Review the generated keys.
  • Pandas infers numbers and other column types; dates are not automatically parsed by this conversion. Missing values and non-finite numeric values become JSON null. Strings that survive parsing remain strings.

Worked example: two inventory rows

Use three CSV lines: sku,stock,note followed by 0012,7,"a,b" and 0013,0,. The downloaded array contains [{"sku":12,"stock":7,"note":"a,b"},{"sku":13,"stock":0,"note":null}], formatted with two-space indentation. The quoted comma stays inside the note, numeric inference removes the SKU leading zeros, and the empty note becomes null.

Flat data stays flat

  • The converter writes a flat record array, with no keyed-output or indentation selector.
  • Quoting numeric-looking identifiers does not disable pandas type inference. Choose the pasted-text Code CSV workflow when leading zeros and string values must be preserved.
  • Empty cells and parser-recognized missing markers such as NaN or N/A become null. Numeric infinities also become null; strings that survive parsing are not reinterpreted.
  • Files are uploaded to the server and generated downloads are stored temporarily. Avoid submitting secrets or sensitive personal information. Non-UTF-8 input can fail, and a file within the 100 MB upload limit can still exceed processing resources.

Diagnose a malformed conversion

  • One giant column: select the delimiter actually used in the file.
  • Rows shifted or parsing fails: check field counts, embedded delimiters, and closing quotes in the original CSV.
  • Leading zeros disappeared: retain the original file and use the string-preserving Code CSV workflow; quoting alone does not prevent inference.
  • Unexpected null values: inspect empty cells and pandas missing-value markers before importing the result.
  • Unreadable text: provide a UTF-8 CSV. Review row counts, renamed headers, and inferred types in the downloaded JSON.

Questions about this specific tool

Does the first row become data?
No. The parser uses the first row as column headers, and subsequent rows become JSON objects.
Can I choose a semicolon or tab delimiter?
Yes. The page offers comma, semicolon, tab, and pipe choices.
Will identifiers keep their leading zeros?
Not necessarily. Pandas can infer numeric values from identifiers such as 0012, producing 12. Quoting a field does not reliably prevent inference. Use the Code CSV-to-JSON pasted-text workflow when every value must remain a string.
What becomes JSON null?
Empty cells, values that pandas already recognizes as missing, and non-finite numeric values become null. Strings that survive CSV parsing remain strings; normalization does not reinterpret them as missing.
What happens to duplicate or blank headers?
Pandas can rename duplicate headers with numeric suffixes and blank headers as Unnamed columns. Inspect the output keys before importing the JSON.
Are dates automatically converted?
No. This conversion does not enable date parsing. Other column types are inferred, so review the output rather than assuming every value remains text.
Where is the file processed and what is downloaded?
The uploaded CSV is processed on the server. The generated JSON is stored temporarily for download as an array of row objects with two-space indentation. Do not upload secrets or sensitive personal information.