Spreadsheet & CSV Tools

CSV Merger

Stack several CSV files into one. The merger lines up columns by their header names, even when files list them in a different order or some files have extra columns, and writes a single file with one header row.

  • Runs in your browser
  • No sign-up
  • Free to use

How to use CSV Merger

  1. Drop two or more CSV or TSV files and arrange them in the order you want.
  2. Choose whether columns are matched by header name or by position.
  3. Optionally add a source-file column and remove duplicate rows.
  4. Select Merge files and download the combined CSV.

CSV Merger features

Match by header name

Columns are aligned by name, so a different column order in one file does not scramble the data.

Different column sets

When a file lacks a column or has an extra one, the result contains the union of all columns with blanks where data is missing.

Single header row

Repeated headers from the second file onward are dropped.

Source column

Optionally record which file every row came from.

Duplicate removal

Drop rows that are identical across files.

Mixed separators

Each file's separator and encoding are detected individually.

When to use CSV Merger

  • Combining monthly or regional exports into one data set.
  • Joining the parts of a download that was split into several files.
  • Bringing together survey or form results collected in separate files.
  • Building one contact list from several sources and removing repeats.

CSV Merger FAQ

What is the difference between matching by name and by position?

By name, a column called email in one file is placed under email in the result, wherever it stood in its own file. By position, the first column of each file goes into the first output column and so on, and only the first file's header is kept. Use position when files have no header or when you know the layouts are identical.

What happens when files have different columns?

With matching by name, the output contains every column that occurs in any file, in the order of first appearance. Rows from files that lack a column get an empty value there. Header names are compared without regard to upper and lower case.

Does merging join tables side by side?

No. This tool appends rows, placing files one after another, which is sometimes called a union or concatenation. A side-by-side join on a key column, as in a database JOIN or a VLOOKUP, is a different operation.

How are duplicates detected?

Two rows are duplicates when every value is identical after alignment. The first occurrence is kept. The source-file column is ignored for this comparison, so the same record appearing in two files counts as a duplicate.

Is there a limit on the number or size of files?

Up to 50 files of up to 50 MB each. Everything is processed in your browser, so the practical limit is your device's memory.

Which encoding and separator does the result use?

UTF-8 with a signature that Excel recognises, and the separator you choose: comma, semicolon or tab.

Merging tables without scrambling them

Appending CSV files sounds trivial: paste one below the other. In practice it goes wrong in three ways. Each file brings its own header row, which ends up in the middle of the data. Files exported at different times list their columns in a different order or contain a column the others lack. And files from different systems use different separators and encodings. Copying and pasting handles none of these, and the result is a file that looks fine at the top and is shifted or garbled further down.

Matching columns by header name solves the alignment problem. The merger reads the header of every file, builds a combined list of all column names, and places each value under its own name. A file whose columns are in a different order is rearranged automatically. A file with an extra column simply contributes that column, and the other files' rows are left empty there.

The source column is a small addition that often proves valuable. Once files are merged, it is no longer evident which row came from where. Recording the file name per row keeps that information, so you can still filter the combined data by month, region or whatever the separate files stood for.

After merging, it is worth opening the result in a viewer and sorting by a key column. Duplicates that differ only in spacing or capitalisation are not removed by exact comparison and show up next to each other when sorted. A cleaning pass that trims spaces first makes duplicate removal considerably more effective.

Other useful tools