How to Open CSV Files With Commas in Fields
Commas inside names, addresses, and descriptions should not split columns. Learn how quoted CSV fields work and how to inspect them.
CSV would be easy if commas only appeared between fields. Real files are not that neat.
Names, addresses, descriptions, log messages, product titles, and notes can all contain commas. A correct CSV parser must know when a comma is a delimiter and when it is part of the value.
Quoting is the rule
When a field contains the delimiter, the field is wrapped in double quotes:
name,address
"Smith, Jane","100 Main St, Suite 4"
Those embedded commas are data. They should not create extra columns.
Why columns shift
Columns usually shift for one of three reasons:
- commas inside fields were not quoted
- quotes are unbalanced
- the file is not actually comma-delimited
If a semicolon or tab is the real delimiter, parsing as comma can make the file look wrong. See CSV delimiters explained.
Open with a real CSV parser
Do not use a text editor and "split on comma" mentally. Open the file in CEESVEE, which parses delimited files with quote handling and delimiter detection.
Once the file is open, check the rows where long text fields appear. If the columns line up there, the quoting is probably working.
The bottom line
Commas inside fields are normal. Broken parsers are the problem. Use a CSV-aware editor that respects quotes and lets you verify the delimiter.
Download CEESVEE for free and open quoted CSV files without shifting columns.
Frequently asked questions
Can a CSV field contain a comma?
Yes. If comma is the delimiter, a field containing a comma should be wrapped in double quotes.
Why did my columns shift?
The file may have unquoted commas inside fields, broken quotes, or it may be using a delimiter other than comma.
Can CEESVEE handle quoted CSV fields?
Yes. CEESVEE parses delimited files with quoting rules instead of simply splitting every line on commas.