Data · 25 tools · nothing uploads

Change CSV separator

Re-delimit a CSV (comma, semicolon, tab or pipe), auto-detecting the current separator when not told what it is. Quote-aware. A record with a quoted field containing a literal newline (including in the header) stays one record. Runs entirely on your device.

Input

Options

live

Change CSV separator re-delimits a file between comma, semicolon, tab and pipe, writing the result as -resep.csv. Leave from blank and the current separator is guessed by parsing the first whole record with each candidate and keeping whichever yields most fields. Line endings are not preserved: CRLF and bare LF both come in, and LF always goes out.

Questions

Which separators does it support?

Comma, semicolon, tab and pipe, on both sides. The to option picks the new one and defaults to semicolon. The from option can be left blank, which is the default, and then the current separator is detected. There is no support for arbitrary characters or multi-character separators.

How does the auto-detection work?

It parses the first complete record with each of the four candidates and keeps whichever produces the most fields. It works on the first record, not the first physical line, so a header with a quoted field containing a newline is handled correctly. A header that genuinely contains every candidate character inside quoted fields can still confuse it, so set from yourself if the guess is wrong.

Why did it say the file already uses that separator?

Because the detected or supplied from value matched the to value, so there would be nothing to change. The message names the separator, spelling tab out in words. Pick a different target, or set from explicitly if you think the detection was wrong.

Are quoted fields preserved?

Yes, and re-quoted for the new separator. A cell that needed quoting for a comma might not need it for a tab, and a cell that was plain might now need quotes because it contains the new separator. The writer works that out per cell, so a value containing a semicolon is safe in a semicolon separated file.

What happens to my line endings?

They are normalised. The parser accepts CRLF and bare LF on the way in, and the writer always emits LF, with a trailing newline at the end of the file. If you need CRLF back, run Line-ending and BOM normalizer on the result.

What is the output called?

Your file name with -resep.csv on the end, and the result line reports the change, for example from comma to semicolon. The file is converted in your browser with no upload, and the whole thing is held in memory while it runs.

Related Data tools

1→1Reorder / insert CSV columnsReorder (and drop) a CSV's columns by name, and optionally insert one new column with a constant value at a given position. Quote-aware. A record with a quoted field containing a literal newline stays one record.Takes one file1→1Map CSV column namesRename a CSV's header to a new schema ("old=new" pairs), and optionally drop every column that isn't named in the mapping. Column order and data are otherwise untouched. Quote-aware. A record with a quoted field containing a literal newline stays one record.Takes one file1→1Transpose CSVSwap a CSV's rows and columns. Column 1 becomes row 1, and so on. A ragged row (fewer cells than the widest row) is padded with empty cells rather than refused. Quote-aware. A record with a quoted field containing a literal newline stays one record, not two.Takes one file1→1Split CSV into partsCut a CSV into several smaller files of N data rows each, repeating the header in every part. Quote-aware: a record with a quoted field containing a literal newline stays one record.Takes one filen→1Merge CSV filesConcatenate several CSVs with the same header into one file, in the order given. Quote-aware. A record with a quoted field containing a literal newline stays one record.Combines the files you drop1→1Remove duplicate CSV rowsStrip repeated rows from a CSV. Compares whole records, not physical lines, so a quoted field containing a newline is one record and stays one record.Takes one file1→1Find incomplete CSV recordsReport every record whose cell count doesn't match the header: too few cells (a truncated record) or too many (an unescaped comma). Read-only: nothing is changed. Quote-aware, so a record with a quoted field containing a literal newline still counts as one record with the right cell count.Takes one file1→1CSV to tableConvert a CSV to markdown, HTML, LaTeX, SQL INSERT statements, JSON, YAML, or Jira table markup. The first row is always the header (object keys for JSON); every format quotes its own special characters.Takes one file