CSV errors guide

Causes and fixes for common CSV errors. Check your data before import.

Last updated: 2026-03-30

Introduction

When importing CSV into a database or integrating with other systems, errors often come from encoding issues, duplicate IDs, or invisible characters. This guide explains the main types and how to fix them using the CSV Checker.

Quick checklist: why imports fail

Use this checklist when a CSV “looks fine” but import still fails. Start from top and you can usually pinpoint the root cause in minutes.

Fast path: run Inspect first (encoding/delimiter/columns/BOM), then Check (duplicates/invisible chars/trim). For garbled text, use encoding recovery.

Real-world examples: find root cause in 10 minutes

Case A. Text is readable in browser but garbled in Excel

Symptom: Preview looks fine, but Excel shows broken characters.

Cause: Source file is UTF-8 without BOM, and Excel opens it with a local code page.

Fix: Convert with encoding recovery and download as UTF-8 with BOM.

Case B. DB import fails with duplicate key

Symptom: Import step returns a duplicate key error.

Cause: Duplicate IDs plus trailing spaces in key values.

Fix: Use single-file check to detect duplicates, trim spaces, then re-import.

Case C. Same-looking values do not match

Symptom: Join/search mismatch even though values look identical.

Cause: Zero-width spaces or non-breaking spaces in text.

Fix: Remove invisible characters in one click, then verify again in compare view.

1. Garbled text (wrong encoding)

Cause

Opening a file with the wrong encoding (e.g. UTF-8 vs Windows-1252) produces garbled text. Excel often saves CSV in a regional encoding unless you choose “CSV UTF-8”.

Fix

See Encoding issues for details.

2. Duplicate IDs

Cause

If the column used as primary or unique key (ID, email, etc.) has the same value in multiple rows, you get DB constraint errors or wrong merges.

Fix

See Duplicate data guide.

3. Invisible characters

Cause

Data copied from other apps or the web can contain zero-width spaces, tabs, or odd line endings that break matching and search.

Fix

The single-file check detects “invisible characters” and can fix them in one click. Trimming leading/trailing spaces is also available.

4. Column count mismatch and empty lines

Rows with a different number of columns (missing or extra commas) can make parsers or import tools fail. Format check shows how many rows have mismatched columns and empty lines so you can fix the source or skip them on import.

5. Duplicate headers

If a data row is identical to the header, column meaning becomes ambiguous. The format check reports duplicate header rows so you can remove or correct them.

Workflow with CSV Checker

  1. Format check (inspect): Upload one CSV; see encoding, delimiter, row/column counts, empty lines, header duplicates.
  2. Single-file check (check): Detect invisible chars, duplicate IDs, trim spaces; apply fixes and download.
  3. For garbled files, use encoding fix (encoding-fix) first to get UTF-8 BOM, then run the checks above.

Home · Start CSV check