Inspect the table before converting it
Confirm the delimiter, header row, encoding, and number of fields per record. Do not split lines on commas manually: quoted fields can contain commas, line breaks, and doubled quote characters.
- Keep an unchanged copy of the source file.
- Check a row containing punctuation and non-ASCII text.
- Confirm headers are unique and non-empty.
Decide which values must remain strings
CSV does not carry a universal schema. A value that looks numeric may be an identifier, ZIP code, account number, or product code. Preserve leading zeroes and long integers as strings unless the destination explicitly defines them as numbers.
Clean columns and duplicates first
Remove unwanted columns, select a deliberate duplicate key, and normalize the delimiter before conversion. This produces smaller JSON and makes it easier to explain why row counts changed.
Validate the result against the source
Format the JSON and confirm it parses. Compare object count with the final CSV row count, inspect empty cells, and spot-check identifiers, dates, quotes, and multiline values before importing the result elsewhere.
CSV values that need a decision
| CSV value | Safer default | Reason |
|---|---|---|
| 00127 | String | A number conversion removes leading zeroes |
| 2026-08-09 | String | Date parsing and time zones vary by destination |
| TRUE | String unless the schema says Boolean | Capitalization alone does not define a type |
| Empty field | Empty string or explicit null by agreement | The two values are not interchangeable |