SmartQueryTools

Change Delimiter in CSV Files Online

Change the delimiter in CSV files — switch from comma to pipe, semicolon, tab, or any custom character — in your browser.

How to change Delimiter in CSV files

  1. Drop your CSV file onto the upload area. The current delimiter is detected automatically and the first 200 rows are previewed as a table.
  2. Under Output delimiter, choose Comma, Semicolon, Pipe or Tab, or choose Custom and type a single character.
  3. Click Download with new delimiter. The whole file is written out again with the new separator.
  4. Check the file name. Tab output is saved with a .tsv extension and every other choice with .csv.

Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.

Worked example

A hardware supplier exports its price list as a comma-separated CSV. The warehouse system of a German partner only imports semicolon-separated files.

Input (CSV)

sku,description,unit_price,stock
BLT-M6,"Bolt, M6 x 20",0.12,5400
NUT-M6,Hex nut M6,0.05,12000
WSH-M6,"Washer; flat, M6",0.03,8000
SCR-4,Wood screw 4 x 40,0.09,

Settings

  • Output delimiter: Semicolon ;

Result

skudescriptionunit_pricestock
BLT-M6Bolt, M6 x 200.125400
NUT-M6Hex nut M60.0512000
WSH-M6Washer; flat, M60.038000
SCR-4Wood screw 4 x 400.09NULL

The values do not change, only the separator. The header line becomes sku;description;unit_price;stock. "Bolt, M6 x 20" no longer needs quotes because a comma is now ordinary text. "Washer; flat, M6" contains the new delimiter, so it is written as "Washer; flat, M6" in double quotes. The missing stock value becomes an empty field at the end of the last line.

Working with CSV files

You do not need to tell the tool what the input delimiter is. The file is sniffed on load, so a CSV that already uses semicolons, pipes or tabs is read correctly, and you can switch it to any of the output choices. Quoted fields in the input are respected. A comma inside "Bolt, M6 x 20" is not treated as a column break.

The file is not edited as raw text. It is parsed into typed columns and then written out again, and that has side effects worth knowing. Numbers are written in their plain form, so 1.50 becomes 1.5 and an all-digit code such as 00731 becomes 731. Columns detected as dates are written as YYYY-MM-DD, whatever format they had before. Quotes are added only where a field contains the new delimiter, a double quote or a line break, so fields that were quoted before may lose their quotes.

The output uses newline (LF) line endings and UTF-8 with no byte order mark. Empty fields and NULLs are both written as nothing between two delimiters. If you are producing a semicolon file for Excel in a European locale, note that Excel may misread accented characters in a UTF-8 file without a byte order mark. Open it through Data > From Text/CSV and pick UTF-8 if names look garbled.

Frequently Asked Questions

Why did my numbers or codes change after changing the delimiter?

The CSV is parsed before it is rewritten. Columns detected as numbers lose leading zeros and trailing decimal zeros. Cast the column to text with the Cast Columns tool first if the exact characters matter.

Can I use a multi-character delimiter such as || or ::?

No. The Custom box accepts one character. Most importers that ask for a multi-character separator also accept a single uncommon character such as a pipe or a caret.

Which delimiters can I choose?

Comma, semicolon, pipe and tab are one-click presets. Custom accepts any single character you type, such as ^ or ~. The download button stays disabled until you enter one.

What happens if a value already contains the new delimiter?

That field is wrapped in double quotes, and any double quotes inside it are doubled. Fields that contain a line break are quoted too. Other fields are written without quotes.

Does the preview show the new delimiter?

No. The preview is the parsed table, which looks the same whatever the separator. The new delimiter is applied only when you download.

Related Tools