CSV IMPORT TROUBLESHOOTING

Why Won't My CSV Import?

A CSV import usually fails because the file's actual structure, delimiter, encoding, or headers differ from the contract the receiving system expects.

Open CSV Checker & Fixer
SHORT ANSWER

Diagnose the file before resaving it. Check quote balance and row widths first, then delimiter, encoding, headings, and the destination's size or required-field rules. Repair only the condition you can identify, keep the untouched export, and retry with a new copy.

Start with structure, not the error message

Messages such as “invalid CSV,” “bad row,” or “could not parse file” describe a failed outcome, not a cause. The useful evidence is the first physical position where the parser loses the expected record shape. An unclosed quote on row 18 can make rows 19 through 200 look malformed even though they are innocent.

Run a structural check before opening and saving the file in a spreadsheet. Confirm whether every logical record has the expected field count and whether quoted fields close correctly. RFC 4180 describes the common convention: commas, quotes, and line breaks inside a field require the whole field to be quoted, and a literal quote inside it is written twice.

Then identify the CSV dialect

CSV is a family of related formats. A file named .csv may use commas, semicolons, tabs, or pipes. It may use CRLF or LF line endings and may be UTF-8, Windows-1252, Shift_JIS, or UTF-16. The W3C tabular-data guidance calls these choices a dialect; a receiver that assumes a different dialect can put an entire row into one column or split values at the wrong character.

Compare the detected separator and encoding with the import documentation. If the preview shows one very wide column, the delimiter is likely wrong. If the columns look right but names are garbled, fix the character encoding separately rather than changing separators and text in one operation.

Check headers and destination rules

A structurally valid file can still violate an application's schema. Look for blank or repeated headings, spelling and capitalization differences, missing required columns, unexpected columns, or data that exceeds a documented length. Some importers require a specific header order; others match names. Verify the destination's sample template instead of guessing.

File limits are a separate class of failure. Check byte size and logical record count, not just the number of lines shown by a text editor. A quoted address or note can legitimately contain several line breaks while remaining one CSV record.

Use a controlled retry

Keep the source export unchanged. Make one category of correction, download to a new filename, and re-run the checker. Record the first failing row reported by the destination and compare it with the local diagnosis. Changing delimiter, encoding, quotes, and whitespace simultaneously makes it difficult to know which change fixed the import—or damaged the data.

If the checker marks a row for review, consult the source system. Adding an empty cell to a short row is safe only when you know which field is missing. Tools For CSV deliberately does not invent that decision.

Broken and corrected examples

A comma inside an unquoted address

BROKEN OR RISKY
id,address,country
42,12 King St, London,GB
CORRECT OR SAFER
id,address,country
42,"12 King St, London",GB

The broken record has four parsed fields under a three-field header. Quoting keeps the comma inside Address.

A quote inside a quoted field

BROKEN OR RISKY
7,"24" monitor",129.00
CORRECT OR SAFER
7,"24"" monitor",129.00

Inside a quoted field, a literal double quote is represented as two double quotes.

How to fix it safely

  1. Open the untouched file in CSV Checker & Fixer and note the detected encoding, delimiter, record count, and column count.
  2. Review malformed quoting and uneven records before applying cleanup such as trimming or duplicate removal.
  3. Compare headings, required fields, size limits, and delimiter requirements with the destination's current import template.
  4. Download a new copy, run the checker again, and retry the import while retaining the original and the destination error log.

Common questions and edge cases

Why does the CSV open in Excel but fail elsewhere?

Excel can infer delimiters, encodings, and column types while opening a file. A strict importer may use a fixed contract and reject the same ambiguity. Inspect the raw structure and import through Excel's From Text/CSV flow when you need explicit choices.

Should every CSV row have the same number of columns?

For a normal rectangular table, yes. RFC 4180 says records should contain the same number of fields. A quoted field may span physical lines, but it is still one field in one logical record.

Can a checker repair every invalid row automatically?

No. It can make deterministic changes, but a short or shifted row may have several plausible meanings. Use the source record or business rules to decide where missing data belongs.