Data tools

Merge CSV files

Concatenate 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. Runs entirely on your device.

Runs on your device. The file is never uploaded.

Merge CSV files concatenates several CSVs into merged.csv, in the order you dropped them, keeping each file's rows in sequence. With hasHeader on, every later header must match the first cell for cell, and only one header survives into the output. A header that differs anywhere stops the run, since merging would misalign columns.

Input

Options

Questions

What happens if the headers do not match?

The merge is refused. Every file after the first has its header compared cell by cell against the first file, and any difference stops the run with a message naming the file and saying that merging would misalign columns. Column order and spelling both count. Use Map CSV column names or Reorder / insert CSV columns to line them up first.

What order are the rows in?

The order you dropped the files in, with the rows of each file kept in their original sequence. The header is written once at the top and every input header row is skipped. Nothing is sorted and nothing is deduplicated; run Remove duplicate CSV rows afterwards if you need that.

Can I merge files without a header?

Yes. Turn hasHeader off and every row of every file is treated as data and concatenated straight through, with no header check. That is the right setting for files that are already headerless, and it also skips the mismatch protection, so make sure the columns line up.

What is the output called?

merged.csv, always, with a result line saying how many files went in and how many data rows came out. If every input turned out to have zero data rows the tool refuses with "every input had 0 data rows" rather than writing a file with nothing but a header.

Will quoted fields and embedded newlines survive?

Yes. Each file is parsed with quote state tracked across the whole text, so a record with a newline inside a quoted cell counts as one row and stays one row. The merged output is re-quoted the same way, so cells containing commas, quotes or newlines come out valid.

How many files can I merge?

There is no fixed limit. Every file is read into memory and parsed before the merged output is built, so the peak memory is roughly the sum of the inputs plus the result. Nothing is uploaded, so the practical ceiling is your device. Several hundred MB of CSV is more than a browser tab will enjoy.

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→1Change CSV separatorRe-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.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 file1→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 file