CSV to JSON Converter
Simple CSV with headers
Semicolon-delimited
Convert CSV data to JSON format instantly. Supports custom delimiters, header row detection, and nested output. Also converts JSON back to CSV.
How to Use CSV to JSON Converter
- Choose the conversion direction: CSV to JSON or JSON to CSV.
- Paste your data into the input area.
- For CSV, select the delimiter and whether the first row contains headers.
- The converted result appears instantly in the output area.
- Click "Copy" to copy the result to your clipboard.
CSV and JSON Conversion
CSV and JSON are two of the most common data interchange formats. CSV is widely used in spreadsheets, databases, and data exports, while JSON is the standard format for web APIs, configuration files, and modern applications.
This tool converts between the two formats instantly in your browser. When converting CSV to JSON, the first row can optionally be treated as column headers to produce an array of objects. When converting JSON to CSV, the tool flattens an array of objects into rows with headers derived from the object keys.
CSV Quoting Rules
Per RFC 4180, any field containing the delimiter, a newline, or a double quote must be wrapped in double quotes. Double quotes inside a quoted field are escaped by doubling them: "She said ""hello""" represents the value She said "hello". Many tools get this wrong, producing broken CSV that chokes parsers downstream. If your data has commas in addresses or descriptions, quoting is mandatory.
The Type Inference Trap
CSV is text-only — there are no data types. When converting to JSON, the converter has to decide whether 01234 is the string "01234" or the number 1234 (losing the leading zero). Zip codes, phone numbers, and product codes routinely get mangled this way. Excel is especially notorious for this. If preserving exact string values matters, make sure your converter treats all fields as strings or handles type inference carefully.
Header Row Conventions
Most CSV files use the first row as column headers, but it's not required by the spec. Some exports omit headers entirely, and some use multiple header rows. When converting headerless CSV to JSON, the result is an array of arrays rather than an array of objects. Always check whether headers are present before converting — getting it wrong shifts all your data by one row.