CSV to JSON Converter
Convert pasted CSV into a formatted JSON array, choose or detect the delimiter, review the result, and copy the complete output without sending your data to a server.
CSV input
JSON output
Generated JSON
No generated output yet. Enter CSV and select Convert to JSON.
How it works
What CSV to JSON conversion does
CSV stores tabular data as records and fields. This converter treats the first record as column headers, then turns each following CSV row into one JSON object inside an array.
How to convert CSV to JSON
Paste CSV, choose Auto-detect or a delimiter, and select Convert to JSON. Review the formatted preview and conversion summary before using Copy JSON to copy the complete output.
Headers become JSON keys
Every header must be present and unique. Surrounding whitespace is removed from unquoted headers, while quoted header text is preserved. Data cells keep their original text and every row must contain the same number of columns as the header.
Quoted fields and delimiters
Properly quoted fields can contain delimiters, double quotes escaped as two double quotes, and embedded line breaks. Comma, semicolon, tab, and pipe delimiters are supported. If automatic detection is ambiguous or the file contains one column, choose the delimiter manually.
Why values remain strings
CSV cells do not carry dependable type information. The converter keeps numbers, leading zeros, boolean-like words, dates, empty cells, and null-like text as JSON strings instead of guessing their meaning.
Privacy and limitations
Processing remains in browser memory and makes no request containing your data. Input is limited to 1,000,000 characters. Malformed quotes, missing or duplicate headers, inconsistent row widths, and unreliable delimiter detection produce an error rather than silently changing data.
Example
Illustrative conversion, separate from your generated output:
CSV records
name,age,city
Alice,25,"New York"
Bob,30,ChicagoJSON array
[
{
"name": "Alice",
"age": "25",
"city": "New York"
},
{
"name": "Bob",
"age": "30",
"city": "Chicago"
}
]Frequently asked questions
How do I convert CSV to JSON?
Paste CSV, leave delimiter detection on Auto or choose the correct delimiter, and select Convert to JSON. The first record supplies the property names for each generated object.
Is my CSV uploaded to a server?
No. Parsing, conversion, previewing, and copying happen locally in your browser. The CSV and generated JSON remain in the page's in-memory state.
Does the converter support semicolons and tabs?
Yes. It supports comma, semicolon, tab, and pipe delimiters. Auto-detection works for clear multi-column data, and every supported delimiter can be selected manually.
Can CSV fields contain commas?
Yes. A field containing the active delimiter must be enclosed in double quotes. Quoted fields may also contain line breaks, and two double quotes represent one literal double quote.
Does the converter preserve leading zeros?
Yes. Every CSV cell is converted to a JSON string, so a value such as 00123 remains "00123" rather than becoming the number 123.
Why are all converted values strings?
CSV does not provide reliable type information. Keeping values as strings avoids silently changing identifiers, dates, booleans, null-like text, or numeric formatting.
What happens if a CSV row has missing columns?
Conversion stops and reports the row's starting physical line number, its column count, and the count expected from the header. Rows are never padded or truncated silently.
Can I copy the full JSON output?
Yes. Copy JSON writes the complete successful conversion to the clipboard. For very large output, the visible preview may be shortened for browser performance, but the copied value is not truncated.