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.
Before you convert data files
Data converters are most reliable when the source file is clean before conversion. Check headers, repeated records, delimiters, blank rows, and unexpected nested fields. A converter can preserve structure, but it cannot know the meaning of unclear source data.
Before using the export in another system, compare a few rows against the source file. Look for shifted columns, empty fields, escaped quotes, and values that should stay as text, such as IDs or postal codes. Small cleanup before conversion prevents larger import mistakes later.
- Keep headers unique and stable.
- Preview row counts before using the export elsewhere.
- Save the original file before cleaning or converting it.
After downloading the result, open it once before using it in a client send, upload form, website, or archive. This final check catches format support issues, unexpected file size changes, missing characters, clipped media, or page-order mistakes while the original file is still available.
If the output will be reused, note the settings that produced it. That makes the next export easier to repeat and reduces guesswork when another file needs the same treatment.