TFT

CSV File Merger

Monthly exports, regional data splits, batch outputs — merge them all into one clean CSV. Handles mismatched column sets intelligently and optionally tags each row with its source file.

CSV File Merger

Combine multiple CSV files into one, handles mismatched columns with alignment strategies

Drag and drop CSV files here, or click to browse

Supports multiple file selection

How CSV File Merger Works:

  • Add multiple CSV files by drag-drop or file selection
  • Files are stacked vertically (rows appended)
  • Union strategy: keeps all columns, fills missing with empty
  • Intersection strategy: only keeps columns present in all files
  • First File strategy: uses only the first file's column structure
  • Optional source column tracks which file each row came from

What This Tool Does

This tool merges multiple CSV files into one combined file. Upload files in any order, choose how to handle mismatched columns, and get a single merged CSV. Files are stacked vertically (rows appended), with columns aligned by header name.

Merge Strategies

Union (all columns): Include every column from every file. If a file doesn't have a column, those cells are empty.

Intersection (common columns): Include only columns that exist in ALL files. Columns unique to some files are excluded.

First file schema: Use only the columns from the first file. Additional columns in other files are ignored.

Source file column: Optionally add a column indicating which file each row came from.

Example: Union Merge

File 1 (sales_q1.csv):

region,revenue,profit
North,10000,2000
South,15000,3000

File 2 (sales_q2.csv):

region,revenue,expenses
East,12000,8000
West,18000,12000

Union merge (all columns):

region,revenue,profit,expenses
North,10000,2000,
South,15000,3000,
East,12000,,8000
West,18000,,12000

Example: Intersection Merge

Same files, intersection merge:

region,revenue
North,10000
South,15000
East,12000
West,18000

Only columns present in BOTH files are included.

When to Use This

Monthly report consolidation: Combine monthly CSV exports into a single annual file.

Regional data aggregation: Merge data from different regional offices into a central file.

Batch processing results: Combine output files from parallel processing jobs.

Survey response compilation: Merge survey results from multiple forms or time periods.

Log file aggregation: Combine log exports from multiple servers or applications.

Column Alignment

Columns are matched by header name, not position:

Same name, different position: Columns are aligned correctly regardless of order.

Case sensitivity: "Name" and "name" are treated as different columns.

Whitespace: "Name" and "Name " (with trailing space) are different columns. Clean headers first if needed.

Source File Tracking

Enable the "add source file column" option to track where each row came from:

source_file,region,revenue
sales_q1.csv,North,10000
sales_q1.csv,South,15000
sales_q2.csv,East,12000
sales_q2.csv,West,18000

Useful for auditing, debugging, or filtering by source later.

File Order

Files are processed in the order you upload them. Rows from the first file appear first, then the second file, etc.

Reorder files before merging if the sequence matters for your use case.

Limitations

Memory: All files load into browser memory. Total size should be under 100MB for best performance.

Many files: Merging dozens of files may be slow. Consider batch merging in groups.

Encoding: All files should use the same encoding (UTF-8 recommended). Mixed encodings may cause character issues.

Frequently Asked Questions

What if files have different column orders?

Columns are aligned by name, not position. Different orders are handled correctly.

Can I merge files with completely different columns?

Yes, using union mode. The result will have all columns from all files, with empty cells where data doesn't exist.

How many files can I merge?

There's no hard limit, but performance depends on total file size and count. For 100+ files, consider scripting the merge.