Home › Everyday calculators and converters
CSV to JSON Converter
Turn pasted CSV into readable JSON without sending the text to a server. This free CSV to JSON converter previews parsed rows, reports inconsistent records, and lets you choose objects keyed by headers or nested arrays for scripts and data pipelines.
Edit object keys. Duplicate or blank names are made unique automatically.
Paste CSV to see a preview and validation.
How to use this CSV to JSON converter
Paste CSV text into the input, including its first row if that row contains column names. Choose Auto-detect to let the tool inspect comma, tab, and semicolon separators, or select a delimiter yourself when the data is unusual. Turn off the header option when the first record is data; this setting affects object keys, while JSON shape is selected separately. Choose an array of objects for named fields, or nested arrays when you need to preserve the table’s column order without keys. Select Pretty-print for indented JSON or switch it off for compact output.
Press Convert to JSON. The validation panel shows the detected separator, record count, and a preview of the first few rows. If a record has too few or too many fields, conversion stops and the panel identifies its starting line in the pasted text. Fix the source text and convert again. With object output, editable key fields appear after conversion. Change a key to update the JSON immediately; those custom keys remain in place when you adjust formatting or switch output options. Repeated names are given predictable suffixes and blank names receive column labels. Copy JSON puts the result on your clipboard when browser permission allows it. Download .json creates a file locally in the browser.
How the conversion works
CSV is parsed as records rather than split blindly on commas or line breaks. A double quote opens a quoted field at its start; inside that field, two consecutive quotes represent one literal quote. Delimiters and newlines inside a quoted field remain part of its value. A newline outside quotes ends the record. This follows common RFC 4180 quoting behavior while allowing comma, tab, or semicolon as the selected separator. Unclosed quotes and inconsistent row widths are errors, so the tool does not quietly produce shifted columns.
For object output with headers, the first record supplies keys and each later record supplies values. In notation, output[i][key[j]] = record[i+1][j]. For example, item,qty followed by Tea,2 becomes [{"item":"Tea","qty":"2"}]. CSV cells stay strings: the text 2 is not changed into the JSON number 2. With headers off, generated names are used if objects are selected. Array output instead serializes each parsed record as an array in its original column order and does not treat the first record specially.
Worked example
Suppose you paste item,qty,unit_price, Tea,2,3.50, and Notebook,3,4.50 on separate lines. The converter finds three columns in the header and two data records. Object mode produces two objects: [{"item":"Tea","qty":"2","unit_price":"3.50"},{"item":"Notebook","qty":"3","unit_price":"4.50"}]. The price remains the exact text 3.50, preserving the trailing zero. Array mode includes the header as the first nested array: [["item","qty","unit_price"],["Tea","2","3.50"],["Notebook","3","4.50"]]. Pretty-print changes whitespace only, not values or structure.
Limitations and data handling
This page converts delimited text, not spreadsheet formulas, formatting, or inferred data types. It does not evaluate formulas or turn numeric-looking cells into numbers. A CSV export that uses a different escape convention may need cleanup before parsing. Every record must have the same field count as the first record, and the tool rejects malformed quoting rather than guessing how to repair it. Duplicate headers can be ambiguous in downstream systems; generated suffixes prevent a JSON key from overwriting a previous value, but you should choose names that make sense for your use. Blank lines are ignored. The browser keeps the pasted content only in the active page while you work; nothing is uploaded or saved by this converter. Clear the input or close the page when finished if you do not want it visible in the tab.
Frequently asked questions
Is my CSV uploaded anywhere?
No. Parsing and JSON generation happen in this page using your browser. The tool makes no request with the pasted CSV, and the data is kept in page memory while you use it.
How do I handle commas inside a CSV value?
Put the value in double quotes, for example "Portland, OR". The parser treats quoted commas as part of the field and also supports doubled quotes and line breaks inside quoted fields.
Why does the converter report a row width error?
Each CSV record must contain the same number of fields as the first record. Check the reported record for a missing delimiter, an extra delimiter, or a quote that was not closed; quoted delimiters do not count as field breaks.
Can I convert CSV without a header row?
Yes. Turn off First row contains headers so the first record is treated as data. Choose Array of objects to use editable keys such as column_1, or choose Nested arrays to preserve each record as an array.
What happens when two headers have the same name?
The converter makes object keys unique in order: repeated names receive suffixes such as email_2. Blank headers become column-number names. After converting, edit the visible JSON key fields; your edits update the result and remain when you change formatting or output options.
Last updated 2026-11-24. Runs entirely in your browser; nothing you enter is uploaded.
More in Everyday calculators and converters
- Percent Off Calculator
- Prozent Rechner online
- Calculate Days Between Dates
- Add or subtract days and months from a date
- Fraction Calculator With Whole Numbers
- GPA Average Calculator
- Calculate Square Feet From Feet and Inches
- Convert Centimeters to Inches
- Pick Random Items From Your List
- Deutschlandticket-Rechner: Wann lohnt sich der Kauf?
- Convert Hours to Decimal for Payroll
- Free Lunch Break Duration Calculator
- Minesweeper Online: Play the Classic Puzzle Free
Optional analytics
With your consent, Google Analytics measures visits and tool-link clicks. No file contents, filenames or form inputs are collected. You can withdraw at any time.