Find the small mistakes that break a CSV
Diagnose delimiter, encoding, quote and header problems using small reproducible examples.
Check the header and one failing row first. A delimiter or quote mismatch often explains an apparent data problem.
Make the problem smaller
Keep the original file. Create a copy containing the header, one ordinary row and the failing row. Remove private values if you need to share an example. A three-row file is much easier to inspect than a large export.
Open the copy in a plain-text editor. A spreadsheet may display the rows neatly while concealing the exact delimiter or quotation marks written into the file. You need to see the text the parser actually receives.
Confirm the delimiter
Comma-separated and semicolon-separated files can both have a .csv extension. Some spreadsheet exports use semicolons, especially when commas are used for decimal values.
name;price;code
Sample;12,50;001
Choose Semicolon in CSV to JSON for this example. Choosing comma makes the header a single field and splits the decimal value instead. Tab-separated files need the Tab option; visible spaces are not the same character as a tab.
The tool never guesses or switches delimiters automatically. Set the delimiter intentionally so an error remains explainable.
Compare field counts
If the header has three names, each data row needs three fields. A trailing delimiter creates an extra empty field:
name,region,code
Sample,Europe,001,
Remove the accidental final comma. An intentional empty final value still needs its separator, for example Sample,Europe, for three fields.
A comma inside a value must be enclosed in quotation marks. Change A new, good idea,Asia,002 to "A new, good idea",Asia,002. Do not remove punctuation from the original meaning just to make the file parse.
Repair quotes without changing the text
Quoted fields must begin and end with a quote. Inside them, a quote is written twice:
title,code
"The ""hello"" example",001
The value becomes The "hello" example. A backslash is not the CSV escape used by this parser. Put the delimiter directly after the closing quote; remove unintended spaces or extra characters there.
A quoted field can contain line breaks, so a single record may span several physical lines. Count records after parsing, not by counting newlines in the source.
Check headers and text encoding
Every header must be non-empty and unique after trimming its outer whitespace. name and name collide. Rename them to reflect their different meaning, such as customer_name and account_name, rather than silently overwriting one column.
Export as UTF-8 if accented or non-Latin text is garbled. The file uploader rejects invalid UTF-8 instead of substituting replacement characters. If garbled text was already pasted or saved in the source, changing the destination encoding will not recover it: return to the original export.
Check the successful result
Convert the small test file. Confirm the header count, row count and tricky values. Then repeat with the complete source, staying under 2 MB and 10,000 data rows.
All output values are strings, including numbers and empty cells. If the destination rejects the JSON, check its required object shape and types separately. Read CSV to JSON without losing data for a complete export walkthrough.
Ready to put it to work?
Use csv to json on your device.