Developer Tools

Common CSV Formatting Problems

· QuickToolFlow
csv formatting data cleanup spreadsheets

CSV looks simple until an import fails. A file may open in one spreadsheet app and break in another. Rows may shift, columns may merge, quoted text may split incorrectly, and invisible characters may cause confusing results.

Most CSV problems come from a small set of formatting issues. If you know what to check, you can fix the file before it reaches a database, spreadsheet, CRM, or analytics tool.

The CSV Formatter is a useful first stop when you need to inspect rows, delimiters, and quoted fields quickly.

CSV Problem Checklist

SymptomLikely cause
File opens as one columnWrong delimiter
Values shift into the wrong columnsUnescaped comma or quote
Import creates blank recordsEmpty rows
Some rows have extra fieldsTrailing delimiters or broken quotes
Names display as strange symbolsEncoding mismatch
JSON conversion creates odd keysHeader problems

Start with the visible symptom. It usually points to the first thing to inspect.

1. Inconsistent Headers

Headers are the closest thing CSV has to a schema. If they are missing, duplicated, or inconsistent, every later step becomes harder.

Problem examples:

Name,Email,Email,Status
Ada,ada@example.com,ada@work.example,active

or:

first name,email address,Signup Date
Ada,ada@example.com,2026-06-10

The second example may be readable, but mixed capitalization and spaces can make downstream mapping less predictable. For technical imports, stable names like first_name, email, and signup_date are often easier to work with.

2. Wrong Delimiter

CSV usually means comma-separated values, but some files use semicolons or tabs, especially when exported from regional spreadsheet settings.

If a file appears as one giant column, the delimiter is probably not what the importing tool expects.

Check whether the file uses:

  • Commas: name,email,status
  • Semicolons: name;email;status
  • Tabs: name email status with tab characters between fields

Do not replace delimiters blindly if values may contain the same character inside quoted text.

Regional Spreadsheet Exports

Some spreadsheet tools export semicolon-separated files when the locale uses comma as a decimal separator. That means a file can be “CSV-like” but not comma-separated.

For example:

name;price;status
Ada;12,50;active

Changing every semicolon to a comma may break decimal values or quoted text. Identify the delimiter first, then convert carefully if the destination system requires commas.

3. Unescaped Commas

If a value contains a comma, it should be quoted:

Invalid or risky:

name,company
Ada,Lovelace, Inc.

Safer:

name,company
Ada,"Lovelace, Inc."

Without quotes, the importer may think the row has too many columns.

4. Quotes Inside Quoted Values

Double quotes inside CSV fields need to be escaped by doubling them.

name,note
Ada,"She said ""hello"" during the demo"

This rule is easy to miss when exporting comments, product descriptions, support tickets, or copied text.

Row Length Consistency

A healthy CSV usually has the same number of fields in every data row as it has headers.

Example problem:

id,name,email
1,Ada,ada@example.com
2,Grace
3,Linus,linus@example.com,extra

The second row is missing a value. The third row has an extra value. Some importers reject the whole file; others silently shift data into the wrong columns.

Before importing, scan for rows that have fewer or more fields than expected.

5. Line Breaks Inside Fields

CSV can contain line breaks inside quoted fields, but not every importer handles them well.

id,note
1,"First line
second line"

This may be valid CSV, but it can still break simple line-based scripts. If the destination system is strict, replace internal line breaks with spaces or a clear marker before import.

6. Empty Rows and Extra Columns

Blank rows at the end of a file can create empty records. Extra delimiters can create unexpected columns.

id,name,email
1,Ada,ada@example.com,

That trailing comma creates a fourth field. Some tools ignore it. Others treat it as an extra column. Review row length before importing.

7. Encoding Problems

Names, symbols, and international characters can break when encoding is misread. If characters turn into question marks or strange symbols, the file may not be interpreted as UTF-8.

Encoding issues are especially common when CSV files move between old spreadsheet software, regional systems, and web applications.

CSV to JSON Problems

When CSV becomes JSON, headers usually become object keys:

first_name,email
Ada,ada@example.com

becomes:

[{ "first_name": "Ada", "email": "ada@example.com" }]

If headers contain duplicates, blanks, spaces, or inconsistent casing, the JSON output becomes harder to use. Clean headers before conversion rather than trying to repair messy object keys afterward.

CSV Cleanup Workflow

Start with headers. Make sure they are present, unique, and stable. Then check the delimiter, quoted values, row length, blank rows, and encoding. If the file will become JSON, clean the CSV first so object keys and values are predictable.

When converting to JSON, the CSV to JSON Converter can help reveal whether headers and rows are being interpreted correctly.

Safe Import Workflow

  1. Keep the original export.
  2. Check headers first.
  3. Confirm the delimiter.
  4. Inspect quoted commas, quotes, and line breaks.
  5. Remove empty rows.
  6. Check row length consistency.
  7. Convert a small sample before importing the full file.

This workflow is especially important for CRM imports, analytics data, product catalogs, user lists, and migration files where a shifted column can create expensive cleanup work.

Keep going

Related tools and guides

All tools