Learn · Data
Clean CSV Before Import
A CSV import is only as reliable as its headers, rows, delimiters, and values. Clean the file before converting or uploading it to avoid silent mistakes.
Check headers first
Headers should be unique, descriptive, and stable. Avoid blank headers, duplicate names, and accidental spaces at the start or end. If the destination expects exact field names, rename columns before converting.
Look for broken rows
Rows can break when a value contains an unescaped comma, quote, or line break. Preview the file and confirm the row count. If one row has many more columns than the rest, fix the source before importing.
Normalize values
Dates, numbers, booleans, and empty values should follow the pattern expected by the next system. A spreadsheet might accept mixed date formats, but an import tool may reject them or interpret them incorrectly.
Keep the original
Save an untouched copy before editing. If the import fails, the original file makes it easier to compare what changed and avoid guessing.
Convert rows
Use CSV to JSON after headers and rows are clean.
JSON issues
Read Common JSON to CSV Mistakes for the opposite direction.