Skip to main content

CSV Merge

Combine rows from several CSV files into one result, align compatible columns consistently, and download the merged file directly.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

Was this tool useful?

How does this tool work?

When two exports describe the same kind of records, merging often means stacking their rows into one file. This CSV tool combines two inputs at a time, either checking headings strictly or taking the union of their columns. It suits two periods, branches or compatible extracts. It does not match records with the same identifier or enrich one customer using fields from another file; that would require a join. Any duplicate records remain present after merging. Combining data is therefore separate from deciding whether its records are unique.

Strict mode, initially selected, requires identical headings in the same order. Capitals and spaces belong to headings: price and Price differ, as does a heading surrounded by spaces. If the headers do not match, the operation is rejected. This check concerns headings rather than the meaning or type of their cells. Two amount columns may still use incompatible currencies or units, which you must harmonise yourself before treating the combined figures as one measure.

Union mode begins with the left-hand columns and appends those present only on the right. Records are realigned by heading and occurrence, so repeated identical headings remain separate positions. A column missing from either source receives empty cells for that source. If records contain fields beyond a short header, blank headings are added rather than losing those values. Validate that resulting schema when the receiving application requires populated, unique column names rather than merely a rectangular set of records.

The engine detects each input's delimiter independently from commas, semicolons, tabs and vertical bars, then writes using the left-hand delimiter. Quotation marks, quoted separators and multiline cells are read as CSV fields. Left-hand records precede right-hand records and the header appears once. Without headings, records are simply appended and the strict-versus-union setting does not align any columns. Unlike spreadsheet-file merging, no provenance column is added. The operation performs neither deduplication nor sorting; it also does not combine values from repeated identifiers.

How to use this tool

  1. Place sources in the required order

    Paste or import the first CSV on the left and the second on the right. Confirm that similarly named columns describe the same concepts and units before choosing how their schemas should combine.

  2. Choose the heading contract

    Keep strict mode for an identical layout or select union to combine different fields. Disable the header option only when the first record of each source genuinely contains data rather than headings.

  3. Inspect added columns and total records

    Run the merge and check the sum of records, newly empty fields and the first records from the second source. Copy or export the result, applying separate deduplication afterwards only when your case requires it.

Use cases

Combine two activity periods

Append sales from two months whose fields represent the same information. Check the date coverage so a day appearing in both exports is not inadvertently counted twice in a later analysis.

Combine closely related schemas

Choose union when a second export adds a status or comment while retaining recognisable common columns. Fields unavailable in the first source remain explicitly empty rather than being inferred.

Prepare a combined dataset

Stack extracts from two branches before filtering, sorting or computing statistics, without assuming that the append operation automatically checks data quality or the business consistency of the supplied information.

Examples

Append structurally identical exports

Strict mode with headers appends the two data records while writing headings only once. P remains before Q. Their quantities are neither added together nor grouped; merging retains two separate records rather than producing a summary.

Input

id;quantity
P;3
---
id;quantity
Q;7

Result

id;quantity
P;3
Q;7

Add a status absent from the first source

Union mode aligns B's amount with the amount column despite its different position in the second source. Status is appended on the right and stays empty for A. Each amount retains its original decimal spelling as text.

Input

id;amount
A;12.50
---
amount;id;status
8.00;B;valid

Result

id;amount;status
A;12.50;
B;8.00;valid

Tips and best practices

  • Rename synonymous headings before a union. customer and Customer become separate columns unless you standardise them first. The engine does not infer business equivalence between similar-looking names or translate labels for you.
  • Each pass handles two inputs. For more sources, combine the result with the next export, or use spreadsheet merging when you require a multi-file import and a column showing provenance.
  • A union can create a very wide table when schemas diverge. Review added fields and remove only those whose absence will not discard information that the receiving person or application actually needs.

Frequently asked questions

Does merging CSV files remove duplicates?

No. All records from both inputs remain in their respective order. Identical records remain separate rows. Apply deduplication afterwards with an appropriate key if the intended dataset should contain only one occurrence of each entity.

Why does strict mode reject the same headings in another order?

It requires complete positional identity of the headers. To realign headings arranged differently, use union after confirming that they represent the same information, rather than different units hidden behind an identical column name.

Can the sources use different delimiters?

Yes. Each input is detected independently and the output uses the first source's delimiter. Fields are quoted again where necessary, preserving their values without reproducing every aspect of the original file's textual presentation.

Does a common identifier combine information into one record?

No. Merging appends records without looking for a common key. To enrich each matching row with information from another table, use a join and check the number of records associated with each key before applying it.

Related tools

Tools similar or complementary to this one.

Similar tools

Merge multiple Excel or CSV files into one table with automatic column alignment.

Data & spreadsheetsUse this tool

Remove duplicate CSV rows using the columns you choose as matching criteria.

Data & spreadsheetsUse this tool
GuideBest practicesBeginner

Split a CSV or Excel table into smaller files

Discover when to split a large table by row count or by a column value, and how to preserve a useful structure in every output file.

29 August 20261 min