A CSV file that looks correct in a text editor can still produce damaged address records after import. Separate two questions: whether the file is parsed correctly, and whether the importer assigns the intended types and columns.

Build a small file you can inspect

addressLine1,addressLine2,postalCode
"42 Example Street","Suite 3, Building B","00100"
"18 Demo Road","","1234-567"

These fictional rows isolate a comma inside a field, an empty optional value and two postcode representations. Start with two rows before trying a large batch. A misplaced column is easier to diagnose when every value has a recognizable purpose.

Check quoting before field mapping

RFC 4180 describes quoting fields that contain commas, line breaks or double quotes, with embedded double quotes doubled. Use a CSV parser rather than splitting each row on commas. Confirm the delimiter and encoding expected by your particular importer; implementations vary.

Quoting does not guarantee text typing

CSV carries field values without a database-style type schema. An import tool can still interpret a quoted postcode as a number. Select a text column type where the tool supports it, then inspect the actual imported value. A display format that adds zeros can conceal a numeric underlying value.

Compare records after the round trip

  1. Save the original fixture alongside its expected field values.
  2. Import it and inspect each structured field.
  3. Export the saved records into a second file.
  4. Parse both files and compare values, not raw file bytes.
  5. Report any intentional normalization separately from information loss.

Line-ending or quoting choices can differ while parsed values remain identical. Conversely, two visually similar spreadsheets can contain different underlying postcodes.

Expand coverage only after the small case passes

Add an address with an accented character, an embedded quotation mark and a multiline value. Check your application's documented size limits at the boundary. Keep a stable fixture identifier outside the address so failures can be traced even when the address itself changes.

Use the structured address workspace for synthetic records and add these targeted edge cases manually. Do not treat generated data as verified mailing information.

Reference

RFC 4180: CSV format