CSV to JSON

Convert CSV into a JSON array — first row is the header, quotes and newlines are handled, optional type detection.

Paste CSV data, or drop a CSV file into the box above
Drop a file here
or click the button below to choose a local file
Choose CSV file
.json / .txt / .csv, up to 10 MB, parsed locally in your browser
Data type
Auto mode detects numbers, booleans and null; choose "All strings" to keep raw text such as 00123.
Delimiter
Empty values
Everything runs locally in your browser. No data is uploaded.
CSV files are read locally in your browser and never uploaded.

Convert CSV table data into JSON

How to use CSV to JSON

CSV to JSON converts tabular CSV data into JSON. After entering CSV text or uploading a local CSV file, you can choose whether the first row is used as field names, then select data type, delimiter, and empty-value handling options before generating JSON that can be copied or downloaded.

Can the first CSV row be used as JSON field names?

If the first CSV row contains headers such as name,age,city, enable the first-row-as-header option and each subsequent row will be converted into a JSON object, for example {\"name\":\"Tom\",\"age\":18,\"city\":\"Los Angeles\"}. If the CSV has no header row, disable the option so the data is handled by column position.

What is the difference between automatic detection and string mode?

Automatic mode detects common data types from CSV cell contents. Numbers can be converted to JSON numbers and Boolean values can be converted to their corresponding type. String mode treats all cell contents as JSON strings. If identifiers, ZIP codes, or other numbers need to retain their original representation rather than being used in numeric calculations, string mode is more appropriate.

How do you choose a CSV delimiter?

Most CSV files use commas to separate fields, but some files use tabs, semicolons, or vertical bars. The tool supports automatic detection and manual selection of comma, Tab, semicolon, or vertical bar. If the preview shows an incorrect number of columns or an entire row is recognized as one field, check the delimiter setting.

How are nested fields converted?

CSV is a two-dimensional table, while JSON can contain nested objects. A standard conversion stores each cell as a field value. When nested-field expansion is enabled, field paths can be used to generate a JSON structure that better represents nested data. When complex arrays or objects need to be preserved, check the converted JSON against the actual CSV column structure.

How are empty cells handled?

Empty cells can be converted to empty strings or JSON null. Empty strings are suitable when you want to preserve the original table field values, while null is useful when API data needs to explicitly represent a missing value. This setting only affects empty cells and does not modify other field contents.

How to convert a local CSV file

Switch to the file upload tab and drag a CSV file into the upload area or select a local file. The browser reads and parses the file locally, then generates JSON. The maximum file size is shown on the current tool page, and the file contents are not uploaded to the server.

How to check the result after converting CSV to JSON

After conversion, review the data preview first to confirm the number of fields and whether the first row was interpreted correctly as headers. Then check numbers, Boolean values, empty values, and delimiters. Once the result is correct, you can copy the JSON or download the generated JSON file. For CSV files with many fields, automatic detection is a useful starting point, after which you can adjust the header, data type, and delimiter settings based on the preview.

How do you convert CSV to JSON?

To convert CSV to JSON, first determine whether the first row contains headers, then choose the data type and field delimiter. The tool converts each row into a JSON object and handles numbers, strings, and empty values according to your settings.

If the CSV does not use commas as delimiters, you can select Tab, semicolon, or vertical bar manually. Review the preview before copying or downloading the JSON result.

  • Paste CSV text or upload a local CSV file and convert it to JSON
  • Use the first row as headers and generate JSON objects from field names
  • Automatically detect cell types or treat all CSV cells as strings
  • Supports automatic detection plus comma, Tab, semicolon, and vertical bar delimiters
  • Empty cells can become empty strings or JSON null, with support for nested fields
  • Everything runs locally in the browser, and CSV content is not uploaded to the server
To convert JSON data back into a table, use JSON → CSV. To query fields in JSON, use JSONPath Query. To check differences between two JSON documents, use JSON Diff.
Comments 0
No comments yet. Be the first to comment!
avatar
Comment content cannot be empty
0/255