Skip to content

CSV Merger

Combine two CSV texts into one, either by stacking their rows or by placing them next to each other.

Processed locally in your browser

Options
0 chars · 0 lines
0 chars · 0 lines
The result will appear here.

What is CSV Merger?

Data often arrives in several files with the same or similar structure. In append mode the second CSV is added below the first and columns are aligned by header name, so files whose columns come in a different order still merge correctly. Choose union to keep every column (missing cells stay empty) or intersection to keep only the columns both files share.

In side-by-side mode the rows of the two files are paired by position and their columns are placed next to each other; duplicate header names get a suffix such as id_2, and the shorter file is padded with empty cells. Without a header row, columns are aligned by position.

How does it work?

  1. Paste the first CSV in the top box and the second one in the second box.
  2. Choose append (stack rows) or side by side (add columns).
  3. In append mode pick union or intersection of columns; set the delimiter and header options.
  4. Copy or download the merged CSV and check the preview.

Common use cases

  • Combining monthly exports into a single yearly file.
  • Merging two lists whose columns are in a different order.
  • Adding a set of enrichment columns next to an existing dataset.
  • Building one import file from exports of two systems.

Examples

Try this input in the tool above:

Input
id,name,city
1,Alice,Paris
2,Bob,Lyon

---

name,id,country
Chloé,3,France
David,4,Belgium
Output
id,name,city,country
1,Alice,Paris,
2,Bob,Lyon,
3,Chloé,,France
4,David,,Belgium

Privacy

CSV Merger runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

This tool concatenates; it does not join rows by a key (like a SQL join). In side-by-side mode rows are matched purely by their position.

Frequently asked questions

What happens to columns that exist in only one file?

With union they are kept and the rows from the other file get empty cells. With intersection they are dropped.

Do both files need the same delimiter?

No. Each file is parsed with the detected (or chosen) delimiter and the output uses the delimiter you select, by default that of the first file.

What if there are duplicate rows after merging?

Use the CSV Deduplicator on the result to remove them.

More tools in JSON & Data →