Download Caxton for Free · 7-day free trial of Caxton Pro, no credit card required · 8 MB · macOS 13.0+
The short answer
Change a delimiter with a tool that reads the quotes, because tr and find-and-replace also change the semicolons and commas inside the values. The free ones are csvkit's csvformat, qsv fmt and Python's csv module, and each rewrites a semicolon file with commas or tabs. Caxton, a native Mac editor for text and data files, converts the open file from CSV ▸ Convert Delimiter, with a choice of quoting and a preview of the first rows before and after.
Why do some CSV files use semicolons instead of commas?
CSV stands for comma-separated values, and RFC 4180, the closest thing the format has to a standard, describes records whose fields are "separated by commas." In practice the separator varies. Python's documentation for its csv module puts it plainly: "The lack of a well-defined standard means that subtle differences often exist in the data produced and consumed by different applications." The character that separates the values is called the delimiter, and the three common ones are the comma, the semicolon and the tab.
The semicolon comes from the decimal comma. In much of Europe the comma is the decimal mark: twelve and a half is written 12,50, and in Germany, Italy or Spain one thousand two hundred thirty-four and fifty-six hundredths is written 1.234,56. A file cannot use the comma for both jobs unless every number is wrapped in quotes, so Excel set to such a region writes a semicolon between the values instead. Microsoft documents the link on its page about importing and exporting text files: "When you save a workbook as a .csv file, the default list separator (delimiter) is a comma," the separator can be changed "using Windows Region settings," and setting the decimal separator to a comma "forces Excel to use a semi-colon for the list separator." That page has no Excel for Mac entry in its Applies To list, and the questions at the end of this guide cover what is documented for the Mac.
The third common delimiter is the tab, in files usually named .tsv or .txt. The registered definition of that format is short: "Fields in a record are separated from each other by a tab character."
What to do when a CSV opens in one column
The app split each line at the commas, and the file separates its values with something else. A semicolon file read that way has no separator the app recognizes, so each whole line lands in the first cell, and a decimal comma such as the one in 12,50 cuts the line in the wrong place. Nothing is damaged. You can tell the app which delimiter the file uses, or you can convert the file, and the first is enough when all you need is to read it. To see which character a file uses, look at its first lines as plain text, and how to open a CSV file on a Mac shows the ways to do that.
- In Numbers. Apple's import page gives the steps: click the table, then "click the Table tab, then click Adjust Import Settings," then "Select one or more delimiter options next to Separate Values Using, or enter a custom delimiter," and "Click Update Table." Apple notes that the import settings can no longer be adjusted once you have edited the imported table.
- In Excel for Mac. Microsoft's page for Excel for Mac describes the import: "Select Data > From Text (Legacy)," choose the file, and "The Text Import Wizard appears." On its second page, "under Delimiters, select the delimiter character or use the Other check box to enter one not listed."
When the file has to go somewhere that insists on one delimiter, such as an import form or a database loader, reading it differently is not enough and the file itself has to be converted. The rest of this guide is about doing that without damaging the values.
If the file uses tabs or pipes and only has to be read, how to open a TSV or pipe-delimited file on a Mac covers reading it as a table without converting it.
Why does tr corrupt a CSV when it changes the delimiter?
The obvious tool is tr, which ships with macOS. Apple's manual page describes it in one line: "The tr utility copies the standard input to the standard output with substitution or deletion of selected characters." It swaps one character for another everywhere, and it has no idea what a field or a quote is. Here is a small semicolon file, orders.csv, with the two things real files contain: a semicolon inside a quoted value, and decimal commas.
order;customer;note;amount
1001;Hansen GmbH;"call first; fragile";1.234,56
1002;Dupont SA;;12,50
1003;Rossi Srl;"deliver to gate 3, north side";999,99
The plain swap is one line:
tr ';' ',' < orders.csv > orders-tr.csv
This is what it writes:
order,customer,note,amount
1001,Hansen GmbH,"call first, fragile",1.234,56
1002,Dupont SA,,12,50
1003,Rossi Srl,"deliver to gate 3, north side",999,99
Two things went wrong, and neither produced an error. The note on order 1001 changed from call first; fragile to call first, fragile, because tr replaced the semicolon inside the quotes as well. And every amount is now two values: 1.234,56 was one field between semicolons, and between commas it is 1.234 followed by 56. A CSV reader finds five fields in each data row under a header of four. Find and replace in a text editor does the same damage, in any editor, because it is the same swap of one character for another.
tr is still the right tool for one kind of file: plain codes and whole numbers, with no quotes and with neither character inside any value. For a tab-delimited list of part numbers it is instant and already installed:
tr '\t' ',' < codes.tsv > codes.csv
If you are not certain that describes your file, use one of the tools below.
How do I convert a semicolon CSV to commas for free?
Use a tool that parses the file as CSV, so that a quoted value is read as one field and the new delimiter is written between fields only. Three free tools are built for that.
Use Python's csv module
The csv module is in Python's standard library, and on a Mac python3 comes with Apple's command line developer tools. Save this as convert.py:
import csv, sys
source, target = ";", "," # write "\t" for a tab
with open(sys.argv[1], newline="", encoding="utf-8") as src, \
open(sys.argv[2], "w", newline="", encoding="utf-8") as dst:
rows = csv.reader(src, delimiter=source)
csv.writer(dst, delimiter=target, lineterminator="\n").writerows(rows)
Then run it with the file to read and the file to write:
python3 convert.py orders.csv orders-comma.csv
The result is a correct comma file:
order,customer,note,amount
1001,Hansen GmbH,call first; fragile,"1.234,56"
1002,Dupont SA,,"12,50"
1003,Rossi Srl,"deliver to gate 3, north side","999,99"
Every row has four fields again. The amounts are quoted because they contain the new delimiter, which is the rule the documentation gives for the default quoting, where the writer will "only quote those fields which contain special characters such as delimiter, quotechar, '\r', '\n' or any of the characters in lineterminator." The note lost its quotes because a semicolon is no longer special, and its text is unchanged.
Three details in the script come from the same documentation. A file "should be opened with newline=''," so that line breaks inside quoted values are read correctly. The delimiter is "A one-character string used to separate fields. It defaults to ','." And the line ending the writer adds "defaults to '\r\n'," which is why the script asks for "\n" to keep the line endings a Mac normally uses. The script reads and writes UTF-8. For a file in another encoding, change the encoding name in both places, and see fix garbled text and the wrong encoding if you are not sure which one it is.
Use csvformat from csvkit
csvkit describes itself as "a suite of command-line tools for converting to and working with CSV," and its csvformat command exists for this job. The documentation describes the command as "Convert a CSV file to a custom output format." You name the delimiter the file has with -d, documented as "Delimiting character of the input CSV file," and the one you want with -D, "Delimiting character of the output file." From that documentation, the command for orders.csv is:
csvformat -d ";" -D "," orders.csv > orders-comma.csv
-T writes tabs, and -U sets the "Quoting style used in the output file: 0 quote minimal, 1 quote all, 2 quote non-numeric, 3 quote none." csvkit's tutorial installs it with pip install csvkit or brew install csvkit.
Use qsv fmt
qsv is a command-line toolkit for CSV files, and its fmt command "Formats CSV data with a custom delimiter or CRLF line endings." It reads with -d, "The field delimiter for reading CSV data," and writes with -t, "The field delimiter for writing CSV data." From its usage text, the command is:
qsv fmt -d ';' -t ',' orders.csv > orders-comma.csv
--quote-always will "Put quotes around every value." The README adds that qsv reads a file named .ssv as semicolon-delimited and a file named .tsv or .tab as tab-delimited without being told, and it installs with brew install qsv.
All three are a good fit for a job that repeats. A script that converts every export in a folder each night is something a command-line tool does better than any app with a window.
How do I convert a CSV to TSV, or a tab-delimited file to CSV, on a Mac?
The same three tools do it, with a tab on one side. In the Python script, write "\t" for the source or for the target. csvformat reads tabs with -t and writes them with -T, described as "Specify that the output file is delimited with tabs." qsv fmt takes -t with T or \t, which its usage text calls "shortcuts for tab."
One thing changes when the target is a tab. A CSV value may contain a comma or a line break as long as it is quoted. The registered definition of TSV has no quoting at all, and it states that "fields that contain tabs are not allowable in this encoding." A value with a tab or a line break in it therefore has to be quoted the CSV way, which a strict TSV reader may not expect, or escaped. Python's writer quotes such a value. If the program that will read your TSV is strict, check a row that has a line break in it before you trust the whole file.
Without Terminal, Numbers can do the conversion. Open the file, set the delimiter in Adjust Import Settings if the columns are wrong, then follow Apple's export page and "choose File > Export To," where CSV is "values separated by commas" and TSV is "values separated by tab stops." The caution is that a spreadsheet interprets values on the way in. Apple's guide says that "By default, Numbers formats table cells automatically" and that it "automatically interprets text strings that you type in a recognized date format as dates." Edit a CSV without Excel changing the data covers what that means for codes, long numbers and dates.
How do I change a CSV's delimiter in Caxton?
Caxton opens a delimited file as a table that is a view of the file itself, and it keeps two jobs apart. Reading a file with a different delimiter changes nothing on disk. Converting the file rewrites it. Here is the walk with the same orders.csv. If you are still deciding on an editor, choosing a CSV editor on a Mac sets Caxton beside the others.
1. Open the file and check how it was read
Drag the file onto Caxton, or choose File ▸ Open… and pick it. A .csv, .tsv, .psv or .dsv file opens in the grid, and Caxton works out the delimiter from the start of the file, choosing among the comma, the tab, the pipe and the semicolon. A comma that mostly sits between digits is treated as a decimal mark and not as a separator, so orders.csv comes up in its four columns, with the quoted note as one cell. Opening and viewing are Caxton Free at any file size.
2. If the columns are wrong, pick the delimiter yourself
CSV ▸ Delimiter lists Auto-detect, Comma, Tab, Semicolon, Pipe and a Custom… item. Choosing one makes Caxton read the file with that character, and the status bar shows that the file is unchanged. This is all you need when the file only has to be read. Nothing is rewritten, and it is Caxton Free.
3. Convert with one menu item
CSV ▸ Convert Delimiter holds Comma (CSV), Tab (TSV), Pipe, Semicolon and Custom…, which takes any single ASCII character except a quote or a line break. Each item rewrites every row with the new delimiter and quotes only the values that need it, by the rule of RFC 4180: a value that contains the new delimiter, a quote or a line break. For orders.csv, Comma (CSV) writes the same four lines as the Python script above, with the amounts in quotes. Converting is Caxton Pro, and step 5 describes what Caxton Free shows you first.
4. Or choose the quoting as well
CSV ▸ Convert Delimiter ▸ Delimiter and Quoting… opens a form with a Delimiter menu, a Custom field and a Quoting menu. There are three quote policies:
- Quote fields that need it (RFC 4180) is the default. It quotes a value only when the value contains the delimiter, a quote or a line break.
- Quote every field puts quotes around all of them, for a destination that expects that.
- No quotes: escape tabs and line breaks (TSV) writes no quotes at all and turns a tab, a line break or a backslash inside a value into
\t,\n,\ror\\. It is offered with the Tab delimiter only. With any other delimiter the form stays open, with a line asking for Tab (TSV) as the delimiter.
To change only the quoting, leave the Delimiter menu on the file's own delimiter, which is where it starts for a comma, tab, semicolon or pipe file, and pick a policy. That is how you put quotes around every field of a comma file, or drop the quotes that are not needed, without touching the delimiter.
5. Read the preview before anything changes
Every conversion stops at a preview sheet first. It gives the number of rows that will change, the new delimiter, the size of the result and whether ⌘Z will reverse it, and it shows up to five of the first rows before and after, so you can watch the quotes arrive around 1.234,56 before you agree. Rows that do not parse cleanly, because they have a different number of fields from the rest or a stray quote, are counted in the sheet as left unchanged. Caxton copies those rows through exactly as they are, old delimiter included, and does not guess. A table with many such rows is view-only, and the Convert Delimiter items stay unavailable until the rows are fixed. Repair a malformed CSV covers fixing them.
The form and the preview open on Caxton Free, so you can check the result on your own file. Applying the conversion is Caxton Pro, which every download includes as a 7-day free trial of Caxton Pro with no credit card required. On Caxton Free the sheet's button changes nothing: the sheet stays open with the reason, and the License window opens beside it.
6. Undo, save, and the size limit
The conversion lands as one undo step, and ⌘S writes the file. The file keeps its name, so use File ▸ Save As… if the converted file should be named .tsv. A file over 256 MB is too large to rewrite in place. Caxton offers to stream the converted rows to a new document, leaves the original untouched, and shows no preview for it. That path is Caxton Pro.
What does Caxton do with numbers like 1.234,56?
Caxton never alters such a value. It reads a column of such values as numbers with a decimal comma when the values themselves show that they are, and this section is exact about the rule, because the same rule decides the Sum in the status bar, the Column Profile and the sort.
The grid and the conversion leave the value alone
The grid shows every value as the text the file holds. 1.234,56 appears as 1.234,56, with no reformatting and no rounding, and converting the delimiter does not change a character of it. When the new delimiter is a comma the value is written in quotes, which keeps it one field.
How Caxton decides that a column uses a decimal comma
There is no setting for the decimal mark. Caxton reads it from the first 1,000 values of the column that are not blank, and it counts only the numbers that one way of reading explains.
- A value counts for the decimal comma when it has both marks and the comma comes last, as in 1.234,56, when its one comma is not followed by exactly three digits, as in 12,50, or when its one comma follows a zero, as in 0,125.
- A value counts for the decimal period in the same three cases with the marks exchanged, as in 1,234.56, 12.50 and 0.125, and when it has more than one comma, as in 1,234,567.
- A value with one comma in front of exactly three digits, such as 1,234, could be either.
The column is read with a decimal comma when at least two values count for it, no value counts for the decimal period, and the values that count for it outnumber those that could be either. In such a column 12,50 is read as 12.5, 0,125 as 0.125, 1.234,56 as 1234.56, 1.234 as 1234 and 1,234 as 1.234.
A column that does not meet the rule is read one value at a time, each by these rules:
- A value with both marks takes the last one as the decimal mark, so 1.234,56 is read as 1234.56.
- A value with one comma and no period is read with a decimal comma, so 12,50 is read as 12.5, unless exactly three digits follow the comma.
- A value with one comma followed by exactly three digits is read as thousands, so a lone 1,234 is read as 1234 and a lone 0,125 as 125.
- A value with one period and no comma is read with a decimal period, so 1.234 stays 1.234.
That is how the status bar and the Column Profile read a column in which a single value shows a decimal comma, or one that mixes the two conventions. A value such as 0,125 or 1.234 can be read wrongly there, and nothing marks it.
What Sum, Avg and the Column Profile show for orders.csv
All three amounts in orders.csv count for the decimal comma: 1.234,56 has both marks with the comma last, and 12,50 and 999,99 each have two digits after the comma. Three values count for it, none counts for the decimal period and none could be either, so the amount column meets the rule. Select the three amounts, and the status bar shows Sum 2247.05 and Avg 749.0167. The status bar applies the rule to the cells you select, so at least two of them have to show a decimal comma.
Select a cell in the column and press ⌃⌘7 for the Column Profile, which is Caxton Free. It reads the amounts as 1234.56, 12.5 and 999.99. Its Type row shows Number, and its Minimum, Maximum, Sum and Mean are 12.5, 1234.56, 2247.05 and 749.0167, each printed in the number format of your Mac.
How Sort Rows orders a column with decimal commas
CSV ▸ Sort Rows… offers six types, and for a column in which nearly every value is written like 12,50 or 1.234,56 the form starts on Currency. A click on the sort arrows in the column header uses the same type. Currency and Numeric both read a column that meets the rule with its decimal comma, so under either type an ascending sort of orders.csv by its amount column puts 12,50 first, 999,99 second and 1.234,56 last, and no alert appears. Text and Natural compare characters and runs of digits, which is not numeric order.
A column that does not meet the rule is sorted without it. Currency then removes every comma before it compares, as if the commas were thousands separators, so 12,50 is compared as 1250. Numeric treats a value with a comma in it as not a number and puts all such values last, in their original order, and when more than 5% of the values fail it first shows an alert titled Column doesn't look numeric.
To give the file to a program that expects decimal periods, rewrite the column. CSV ▸ Transform Cells… has a Decimal Separator transform, and its option Comma to period (1.234,56 to 1234.56) rewrites the column you choose, with its own preview. The opposite option, Period to comma (1,234.56 to 1234,56), writes the decimal comma back without the thousands period. Transform Cells and Sort Rows both open their previews on Caxton Free and need Caxton Pro to apply. Transform a CSV column walks through the transform panel.
Which way of changing the delimiter fits which job?
| The job | Free tools | In Caxton |
|---|---|---|
| You only need to read a semicolon file. | Numbers and Excel for Mac both let you pick the delimiter when you import. | CSV ▸ Delimiter reads it your way and leaves the file unchanged, on Caxton Free. |
| A semicolon file with decimal commas has to become a comma file. | Python's csv module quotes the amounts for you, and csvformat and qsv fmt are built for the same job. | CSV ▸ Convert Delimiter ▸ Comma (CSV) converts it after a preview. |
| A CSV has to become a TSV, or a TSV a CSV. | The same three tools write tabs, and Numbers exports both formats. | CSV ▸ Convert Delimiter ▸ Tab (TSV) or Comma (CSV) does it. |
| Every field must be quoted, or only the quoting should change. | csvformat -U 1 and qsv fmt --quote-always quote everything. | Delimiter and Quoting… changes the quoting and keeps the file's own delimiter. |
| The file holds plain codes with no quotes. | tr is enough, and it is already installed. | Any Convert Delimiter item works as well. |
| The same conversion runs on many files or on a schedule. | A script is the better tool here. | Caxton converts the one file that is open in front of you. |
Open the file, choose CSV ▸ Convert Delimiter, and read the first rows before and after in the preview before anything is written.
Download Caxton for Free7-day free trial of Caxton Pro, every feature, no credit card required. After it, Caxton Free keeps opening, searching and filtering at any size, and you can edit and save files up to 10 MB as text.
Frequently asked questions
Why does my CSV open in one column?
The app split each line at the commas, and the file separates its values with another character, usually a semicolon written by a spreadsheet in a region where the comma is the decimal mark. Nothing is damaged. In Numbers, click the table and use Adjust Import Settings to pick the delimiter. In Excel for Mac, use Data, then From Text (Legacy), and choose the delimiter in the Text Import Wizard. In Caxton, CSV ▸ Delimiter reads the file with the character you choose and leaves the file as it is.
How do I make Excel on a Mac use commas?
Microsoft documents the list separator for Windows only. Its page on importing and exporting text files changes the separator through Windows Region settings, ties a decimal comma to a semicolon separator, and has no Excel for Mac entry. On a Mac, the number format is set in System Settings under General, then Language & Region, where Apple describes Number format as the format for numbers, such as when a comma appears. Microsoft's documentation does not state which separator Excel for Mac then writes. What Microsoft does document for the Mac is the import, where the Text Import Wizard lets you select the delimiter. If Excel has already written semicolons, convert the file afterwards with one of the tools in this guide.
What's the difference between CSV and TSV?
A CSV separates its values with commas and a TSV separates them with tabs. The larger difference is quoting. In a CSV, a value that contains a comma, a quote or a line break is wrapped in double quotes, which is the rule in RFC 4180. The registered definition of TSV has no quoting and does not allow a tab inside a field, so a tool that writes TSV either quotes the CSV way or escapes a tab as a backslash and a t. Check which of the two the receiving program expects before you choose.
Will converting change my numbers or dates?
Not with a tool that parses the file as CSV. Python's csv module and Caxton's Convert Delimiter move the delimiter and adjust the quotes, and the characters of each value stay as they were, so 1.234,56 and 03/04/2026 come out as 1.234,56 and 03/04/2026. A value that contains the new delimiter gains quotes around it, which is how a decimal comma survives in a comma file. Numbers and dates change when a spreadsheet opens the file and interprets them, or when tr or find-and-replace hits a comma inside a value.
Sources
- Caxton manual: the CSV workbench, Delimiter, Convert Delimiter and Delimiter and Quoting
- Caxton manual: Column Profiles
- Caxton manual: Sort Rows and its types
- Caxton manual: Transform Cells and the Decimal Separator transform
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files
- IANA: the text/tab-separated-values media type and its definition of TSV
- Python documentation: csv, CSV file reading and writing
- csvkit documentation: csvformat
- csvkit documentation: arguments common to all tools
- csvkit documentation: getting started and installing csvkit
- qsv: the usage text of the fmt command
- qsv README: file formats and installation
- Microsoft Support: Import or export text (.txt or .csv) files
- Microsoft Support: Import and shape data in Excel for Mac (Power Query)
- Apple Support: Import an Excel or text file into Numbers on Mac
- Apple Support: Export to other file formats in Numbers on Mac
- Apple Support: Format dates, currency, and more in Numbers on Mac
- Apple Support: Change Language & Region settings on Mac
- Apple's manual page on macOS:
man tr, read with the shipped tool in Terminal