MyScripter
Tools

CSV to JSON Converter

Turn spreadsheet exports, database dumps, or any CSV file into clean structured JSON. This converter auto-detects headers, handles quoted fields with commas, respects line breaks inside cells, and infers data types (numbers, booleans, nulls). Runs entirely in your browser for privacy.

CSV to JSON Converter

How to Use This Tool

  1. Paste your CSV data or upload a .csv file.
  2. Confirm the auto-detected delimiter and headers.
  3. Choose output format: array of objects, array of arrays, or nested.
  4. Copy the JSON or download as a .json file.

Features

  • Auto-detects delimiter (comma, semicolon, tab, pipe)
  • Handles quoted fields with embedded commas and newlines
  • Type inference: numbers, booleans, nulls parsed automatically
  • Multiple output modes: array of objects, array of arrays, or keyed by column
  • Preserves UTF-8 encoding for international characters
  • No file size limit — processes large CSV files in chunks

Example

Simple CSV to JSON array

Headers become object keys; each row becomes one object.

Sample

name,age,active
Alice,30,true
Bob,25,false

What you get

[{"name":"Alice","age":30,"active":true},{"name":"Bob","age":25,"active":false}]

CSV with quoted fields

Handles commas inside quoted values correctly.

Sample

city,description
"Berlin","Capital, largest city"
"Munich","Southern city"

What you get

[{"city":"Berlin","description":"Capital, largest city"},{"city":"Munich","description":"Southern city"}]

Frequently Asked Questions

How are data types detected in CSV values?
The converter checks each value: pure numeric strings become numbers, "true"/"false" become booleans, empty cells become null, and everything else stays as a string. You can disable type inference to keep all values as strings.
What if my CSV uses semicolons instead of commas?
The converter auto-detects the delimiter by analyzing the first few rows. It handles comma, semicolon, tab, and pipe separators automatically. You can also override the detection manually.
Can I convert CSV to nested JSON?
Yes. If your headers use dot notation (e.g., "address.city"), the converter can group them into nested objects. Enable "Nested output" mode to activate this feature.

Related Tools