Stack the rows of two or more CSV files into a single file. Columns can be matched by name, so files with the same headers in a different order still line up, or by position. An optional column records the source file of each row.
CSV Merger tool
Your file stays in this browser tab. It is not uploaded by SheetShift.
CSV files (select two or more)
Drag a file here, or
How to use the CSV Merger
Select two or more CSV files at once, or add them one at a time. You can also paste text for each file.
Match by header name when the files share column names. Missing columns are left empty in the rows that lack them.
Tick "Add a source_file column" to keep track of where each row came from.
Press Merge and download the combined file.
Example: input and output
This example was produced by the same code the tool runs, with these settings: mode = header, addSource = true. You can download the sample file(s): jan.csv, feb.csv.
CSV, TSV, TXT. Files may use different delimiters; each one is detected separately.
Limitations
Header matching ignores case and surrounding spaces. Two columns that differ only by case are treated as one.
Position matching assumes every file has the same column order. Files with fewer columns are padded; extra columns beyond the first file are dropped and you get a warning.
This tool stacks rows. It does not join tables on a key.
When this helps
Monthly exports
Twelve monthly sales files with the same columns become one yearly file ready for a pivot.
Files from different tools
Exports where one tool added an extra column still merge cleanly by header.
Frequently asked questions
Do the files need the same columns?
Not with header matching. The result has every column found in any file, and cells are empty where a file had no such column.
Is the order of rows kept?
Yes, files are added in the order listed, and rows keep their order inside each file.
Can I merge Excel files?
Convert each sheet with the Excel to CSV tool first, then merge the CSV files here.
Related tools
CSV Splitter Split a large CSV into smaller files by row count, number of parts or the value in a column.
Remove Duplicate Rows Remove duplicate rows from a CSV by whole row or by chosen columns.
CSV Comparator Compare two CSV files by a key column and see rows only in A, only in B and changed cells.