Recognize semicolon-separated CSV

How to tell when a CSV file uses semicolons instead of commas, what changing the delimiter does to your data, and when converting or keeping it is the safer choice.

A file can end in .csv and still not use commas. Many exports use the semicolon as the field separator, and reading such a file with the wrong delimiter produces a jumbled single column or fields split in the wrong places. This review covers how to spot a semicolon-delimited file, what converting it changes, and when to convert, keep or replace it with plain text.

Short answer: should you convert it?

If the file opens correctly in the program that will use it, leave the delimiter alone. Convert to commas only when the destination expects commas and you can parse the file with a tool that handles quoted fields, so the separator changes and the values stay the same. The tradeoff is the decimal comma. Semicolon files often come from settings where the comma marks decimals, such as 3,50 for three and a half. A converter that changes only the separator keeps those values as text that a comma-expecting program may misread. One that also rewrites the decimals changes the data itself. If the goal is to show a few rows to a person rather than feed a program, a plain-text table or a short written summary is usually clearer than raw delimited text in either form.

Why semicolons appear in CSV files

The widely cited CSV description, RFC 4180, uses the comma as its separator. In practice, CSV is a loose family of formats, often called dialects, that differ in delimiter, quote character, line endings and encoding. Where the comma is the decimal separator, a comma delimiter would clash with numbers, so spreadsheet software in those locales commonly writes semicolons instead. The choice usually follows the operating system's regional list-separator setting, not anything recorded in the file. A semicolon-separated file is therefore normal CSV from a different dialect, not a corrupted file.

How to recognize a semicolon-delimited file

Open the file in a plain-text editor rather than a spreadsheet, so you see the stored characters before any program interprets them. Then check the clues below.

Clue | Suggests semicolon delimiter | Suggests comma delimiter
Semicolons per line | Same count on every line | Few, irregular or none
Commas per line | Vary, often inside numbers | Same count on every line
Numbers | Written like 3,50 or 1.234,56 | Written like 3.50 or 1,234.56
Opening the file in a spreadsheet | Every row lands in one column | Columns split cleanly
First line | May read sep=; | No such line

The most reliable single test is consistency. Count each candidate character on several lines outside quoted text. The real delimiter appears the same number of times on every row. A character that appears inside values, such as a decimal comma, varies from row to row. Some spreadsheet programs write a sep=; first line as a separator hint. It is not part of any formal CSV standard and other tools may treat it as an ordinary data row.

What changing the delimiter actually alters

This is a change to the stored characters, not to how the text is displayed. No font, styling or display setting is involved. Converting a semicolon file to a comma file rewrites every unquoted separator, and should add quotes around any field that now contains a comma. A careless find-and-replace of every semicolon is not equivalent. It also changes semicolons inside quoted values and leaves decimal commas unprotected, which shifts columns. The example below shows the risk.

Original (semicolon-delimited):
id;name;price
1;Widget;3,50
2;"Gadget; large";12,00

Read with a comma delimiter (wrong):
row 1 -> [id;name;price]
row 2 -> [1;Widget;3] [50]
row 3 -> [2;"Gadget; large";12] [00]

Correctly parsed, then written with commas:
id,name,price
1,Widget,"3,50"
2,Gadget; large,"12,00"

In the correct conversion, the quoted semicolon in Gadget; large stays inside its field, and the price values keep their decimal commas but are now quoted so they stay in one column. Whether 3,50 is then read as a number depends on the receiving program's locale. Turning it into 3.50 is a separate value transformation and should be a deliberate choice.

Copying, sharing and accessibility

Delimited text survives copy and paste as long as the characters themselves are not changed, but the result depends on where it lands. Pasting into a spreadsheet may put each whole line in one cell if the program expects a different separator. Pasting into a chat or email shows raw semicolons, which people find harder to scan than aligned columns. Some editors and messaging apps also replace straight quotes with curly quotes, which breaks quoted fields. This article does not include tests of specific applications, so check the behavior of your own destination with a small sample before relying on it.

For accessibility, a screen reader reading raw delimited text will generally announce the punctuation or run fields together, depending on its verbosity settings. No assistive technology was tested for this review. When people need to read the data, present it as a properly structured table with headers, or describe the key values in sentences. Keep the delimited file as the machine-readable copy rather than the version people read.

Encoding is another reason a file might not read correctly. Files exported from different systems may use UTF-8, UTF-8 with a byte order mark, or an older regional encoding. A file with the correct delimiter can still show garbled accented characters if the encoding is guessed wrong. Check the delimiter and the encoding separately.

Tools and search terms for detecting the delimiter

Useful search terms include CSV dialect detection, delimiter sniffing, list separator setting and importing CSV with a custom delimiter. Most spreadsheet programs offer a text import or text-to-columns step where you choose the separator yourself. Menu names and locations vary by product and version, and were not verified for this article. Python's standard library includes csv.Sniffer, which guesses the dialect from a sample of the file. Treat its result as a guess to confirm, because a short or unusual sample can mislead it.

  • View the file in a plain-text editor first.
  • Count candidate delimiters on several rows, ignoring quoted text.
  • Check how numbers are written to see whether the comma is a decimal mark.
  • Import with an explicit delimiter instead of relying on auto-detection.
  • If converting, use a CSV-aware parser and writer, not find-and-replace.
  • Compare row and column counts before and after conversion.

Gaps in this review

No source files, application tests or measurements were provided for this review. Statements about how particular spreadsheets, editors or screen readers handle semicolon-delimited text are general principles, not verified observations. Before converting important data, confirm the behavior of your own tools with a representative sample.