Developer and Data Tool
CSV to JSON Converter
Convert CSV and other common delimited text into a JSON array of objects directly in your browser. The first row is used as the JSON property names.
Convert CSV to JSON
Paste your delimited data, select the delimiter, and convert it into structured JSON. Quoted fields can contain delimiters such as commas.
How the CSV to JSON Converter works
CSV stores tabular information as rows containing fields separated by a delimiter. JSON can represent the same tabular information as an array of objects.
This converter treats the first row as the header row. Each header becomes a JSON property name, and every following row becomes one JSON object.
CSV to JSON example
CSV input
JSON output
The comma inside “Seattle, WA” is preserved as part of the field because the value is enclosed in quotation marks.
Supported delimiters
The converter supports several common delimited-text formats:
- Comma-separated values
- Semicolon-separated values
- Tab-separated values
- Pipe-separated values
Select the delimiter that matches the source data before converting.
Quoted CSV fields
A field can be enclosed in double quotation marks when it contains a delimiter, quotation mark, or line break.
The commas inside the quoted address remain part of the address rather than creating additional columns.
Two consecutive quotation marks inside a quoted field are interpreted as one literal quotation mark.
CSV headers and JSON keys
The first row of the input becomes the property names used in every JSON object.
If a header is blank, the converter creates a replacement such as column_1. If the same header appears more than once, later duplicates are renamed so one property does not silently overwrite another.
Why values remain strings
CSV itself does not reliably describe the intended data type of every field. A value such as 00123 could be an identifier, postal code, product code, or number.
Automatically converting it to a JSON number would change it to 123. For that reason, this tool preserves CSV field values as strings.
Common CSV conversion problems
- Selecting the wrong delimiter.
- Leaving a quoted field unclosed.
- Having a different number of fields in different rows.
- Using blank or duplicate column headers.
- Expecting automatic conversion of strings into numbers or dates.
- Pasting XLSX spreadsheet data instead of plain delimited text.
- Assuming every software product exports CSV in exactly the same way.
Assumptions and limitations
This converter is intended for ordinary CSV and delimited-text data using common quotation conventions.
CSV is not implemented identically by every database, spreadsheet, programming language, legacy application, or export system.
Extremely large data sets, unusual character encodings, malformed quotation rules, proprietary export formats, custom escape sequences, or unusual record separators may require a specialized CSV parser.
For an important migration or production import, validate the generated JSON against the destination system’s expected schema before using it.
Privacy
The text entered into this converter is processed by the code running in your browser. The tool does not require an account, login, API key, or file upload to perform the conversion.
Avoid pasting passwords, authentication tokens, API keys, private customer information, medical information, financial account information, confidential business data, or other sensitive material when it is unnecessary.
For additional information, see the Tool Accuracy and Privacy page.
Frequently asked questions
What is CSV?
CSV is a plain-text format commonly used to store tabular data as rows and fields separated by a delimiter, usually a comma.
What is JSON?
JSON is a structured text format that represents data using objects, arrays, property names, and values. It is widely used by APIs and software applications.
Does this converter support commas inside values?
Yes. A comma inside a properly quoted field is preserved as part of that field.
Can I convert tab-separated data?
Yes. Select Tab from the delimiter menu before converting.
What happens if rows contain different numbers of fields?
The converter displays a warning. Missing values are represented by empty strings, but you should inspect inconsistent rows before relying on the result.
Why are numeric-looking values kept as strings?
Preserving strings prevents accidental changes to identifiers, leading zeros, dates, postal codes, product codes, and other values whose intended data type cannot reliably be inferred from CSV alone.
Can I convert an Excel XLSX file directly?
No. XLSX is a spreadsheet file format rather than plain CSV text. Export the spreadsheet as CSV first and then paste the CSV here.