Skip to content
Really Cool Online Tools logoReally Cool Online Tools

DEV-004

CSV Merger

Combining CSV files is easy when every file has the same columns in the same order, and quietly dangerous when it does not. Pasting one file under another with a different column order puts phone numbers in the postcode column and nothing warns you. This tool makes you choose what should happen, and tells you what it did.

  • Free
  • No signup
  • Private · runs locally

Your files are read and combined in your browser and are never uploaded.

How to merge CSV files

  1. Drop two or more CSV files onto the upload area. Each one is listed with its row and column count.
  2. Choose what should happen when the columns do not match.
  3. Optionally add a column recording which file each row came from.
  4. Download the merged file.

The three ways to handle mismatched columns

Matching is by column name, not by position, which is what makes the union and intersection options safe. A file whose columns are in a different order still lines up correctly.

OptionWhat it doesChoose it when
Require matching headersRefuses to merge unless every file has identical columnsThe files should be identical and you want to be told if they are not
Keep every columnTakes the union. Rows from a file missing a column get a blank thereThe files are related but some have extra fields
Keep only shared columnsTakes the intersection and drops the rest, listing what wentYou only need the fields every file has

What a careless merge gets wrong

Three things break most hand-rolled merges, and all three are handled here. The header row of the second and later files must not become a data row. A field containing a comma is wrapped in quotes and must stay wrapped. A field containing a line break is legal inside quotes and must not be treated as the end of the record.

The merged file is written with a byte order mark, because without one Excel on Windows reads UTF-8 as the local code page and turns every accented name into unreadable characters.

Frequently asked questions

Are my files uploaded?

No. They are read and combined in your browser. Nothing is transmitted, which matters when the files hold customer or employee data.

How large a file can I merge?

Up to 50 MB per file, which is roughly half a million rows of typical data. The limit exists because everything is held in memory while it is combined.

Does it remove duplicate rows?

No, it combines without judging the contents. For deduplicating a list of email addresses, use the CSV email list cleaner instead.

What about semicolon separated files?

They are detected automatically, which covers exports from European versions of Excel. You can choose the separator for the saved file independently.

Will the merged file open correctly in Excel?

Yes. It is written as RFC 4180 CSV with a byte order mark so that accented characters survive, which is the usual complaint about CSV files and Excel.

Read more

Background on when and why to use this.

Other tools people use alongside the Merge CSV.

Browse all developer tools or see every tool.