creatorvalet

What is a CSV file?

CSV is the simplest useful file format there is. Almost everything that goes wrong with one is about encoding, separators, or what Excel decides your data means.

Updated 2026-08-04

A CSV file is a text file containing rows of values, with the values in each row separated by a character — usually a comma. The name stands for comma-separated values, and the whole specification fits on a page.

That simplicity is the reason it has outlived every format designed to replace it. It is also the reason it goes wrong so reliably: a format with almost no rules leaves everything to convention, and conventions differ.

What one actually looks like

name,city,postcode
Anna,Umeå,90325
Bo,Malmö,21120

The first line is usually a header naming the columns, though nothing requires it. Every subsequent line is a record. There are no data types, no formatting, no formulas and no sheets — a CSV cannot know that a column holds dates, and it cannot remember that you wanted the numbers right-aligned.

That is a feature. It means any program on any system can read the file, which is not true of any spreadsheet format.

Trap one: the separator is not always a comma

Swedish, German, French, Italian and several other locales use a comma as the decimal mark3,14 rather than 3.14. A comma cannot separate fields in a file that also uses it inside numbers without ambiguity, so localised versions of Excel use a semicolon instead.

The consequence is the single most common CSV complaint: you open a file and every row lands in one cell. Excel looked for semicolons, found none, and concluded the row was a single value. The file is fine. It was written for a different locale.

You can see which separator a file actually uses by opening it in a viewer that detects it rather than assuming.

Trap two: å becomes Ã¥

This one has an exact cause, and knowing it makes the fix obvious.

In UTF-8, the letter å is stored as two bytes: C3 A5. Windows-1252 — the older single-byte encoding Excel falls back to — reads those as two separate characters, à and ¥. Hence Ã¥. The same mechanism turns ö into ö and a curly apostrophe into ’.

The file is not corrupted. It is being read with the wrong assumption about what the bytes mean. The fix is to tell the reader which encoding was used — which is exactly what a byte order mark does.

Trap three: leading zeros vanish

A postcode like 01234, a product code like 007, a phone number starting with zero — these are text that happens to look numeric. Open the file in Excel and it converts them to numbers, and the leading zero disappears. Save, and the loss is permanent.

Nothing warns you about this. The cells simply hold different values than they did.

Trap four: line breaks inside values

A quoted field is allowed to contain a line break:

id,note
1,"first line
second line"

This is valid CSV, and it is common in exported comments and addresses. It also breaks every parser written by someone who assumed one row equals one line — which is most parsers people write themselves.

Why “CSV UTF-8” exists in Excel’s Save dialog

Excel offers two CSV options and does not explain the difference. It is the byte order mark: CSV UTF-8 writes one, plain CSV does not.

If your data contains any character outside plain English, choose CSV UTF-8. That is the whole rule. The three extra bytes at the start of the file are what stop å from becoming Ã¥ on the machine that opens it next.

More on this

  • CSV UTF-8 vs CSVExcel offers two CSV options and explains neither. The difference is three bytes at the start of the file — and whether your accented characters survive.