If your CSV files share exactly the same header row, combining them takes one command. If they don’t, the same command quietly produces a broken file. Here is how to tell which situation you are in, and what to do in each.
Three exports of the same data
north.csv · comma
| order_id | customer | amount | |
|---|---|---|---|
| 2 | 1001 | Acme Ltd | 120.00 |
south.csv · semicolon
| Amount | Order ID | Customer | |
|---|---|---|---|
| 2 | 85.50 | 1002 | Boro Supplies |
west.csv · comma
| ORDER-ID | Customer | Amount | Discount | |
|---|---|---|---|---|
| 2 | 1003 | Beta & Co | 240.00 | 10% |
| order_id | customer | amount | ||
|---|---|---|---|---|
| 2 | 1001 | Acme Ltd | 120.00 | |
| 3 | Amount;Order ID;Customer | |||
| 4 | 85.50;1002;Boro Supplies | |||
| 5 | ORDER-ID | Customer | Amount | Discount |
| 6 | 1003 | Beta & Co | 240.00 | 10% |
| order_id | customer | amount | Discount | Source File | |
|---|---|---|---|---|---|
| 2 | 1001 | Acme Ltd | 120.00 | north.csv | |
| 3 | 1002 | Boro Supplies | 85.50 | south.csv | |
| 4 | 1003 | Beta & Co | 240.00 | 10% | west.csv |
When simple concatenation works
Stacking CSV files end to end is safe when every file:
- has exactly the same header row, in the same order, spelled the same way;
- uses the same delimiter (all commas, or all semicolons);
- uses the same text encoding, ideally UTF-8;
- ends with a line break, so its last row doesn’t run into the next file’s first row.
If that is true, you don’t need special software. Put the files in their own folder and run one of these from inside it:
Windows (Command Prompt), then delete the repeated header lines from the result:
copy /b *.csv ..\combined.csv
Mac or Linux (Terminal), keeping only the first file’s header:
awk 'FNR==1 && NR!=1 {next} {print}' *.csv > ../combined.csv
Both write the result to the parent folder, so the output file isn’t swept up as one of the inputs. Neither command looks at what the columns mean. They only glue text together.
Import-Csv | Export-Csv looks like it handles different headers, but Microsoft’s documentation says Export-Csv lays out the file using the first object’s properties. Columns that only appear in later files are left out of the output without a warning.What breaks when CSV files don’t match
| Difference | What you see after joining as text |
|---|---|
| Columns in a different order | Amounts under Order ID, names under Amount. No error. |
| A missing or extra column | Values shift one place left or right from that point on. |
| Headers spelled differently | “order_id” and “Order ID” treated as two columns, each half empty. |
| Semicolons instead of commas | Each row lands in one cell. Semicolon CSVs are common from systems set up for countries that use a comma as the decimal separator. |
| Different encodings | £ turns into £ or a � symbol, usually in files saved as ANSI rather than UTF-8. |
| Repeated header rows | Header text appears as data rows and breaks totals and filters. |
How to combine CSV files with different headers
For a deeper look at the header-matching decisions, see Combine CSV files with different headers.
Combining CSV files in ConsoliSheet
ConsoliSheet does the steps above in your browser:
- Upload up to 50 files, up to 20 MB each and 100 MB in total. You can mix CSV and XLSX.
- Delimiters are detected for comma, semicolon, tab and pipe files. If a file could reasonably be read more than one way, ConsoliSheet tells you instead of guessing.
- Headers are matched by name. Headers that differ only in capitals, extra spaces, underscores or hyphens become one column, whatever order they appear in. Differently worded headers stay as separate columns.
- Problem rows are flagged, such as a row with more fields than the header.
- You download one XLSX with a Source File column. Values from CSV files are kept exactly as written, so leading zeros in codes and IDs survive.
Exports that start with a report name or timestamp above the header need that header found first: merging files when the header row is in a different place.
Common questions
How do I combine multiple CSV files into one?
If they have identical headers, stack them and remove the repeated header rows. The commands above do that in seconds. If the headers differ, match columns by name before combining so values stay in the right columns.
Can I combine CSV files with different columns?
Yes. Build the result from every column that appears in any file, fill each row from its own file by header name, and leave blanks where a file doesn’t have that column.
Why is my combined CSV all in one column?
At least one file probably uses semicolons or tabs instead of commas, so the program reading it sees one long value per row. Import it with the right delimiter, or use a tool that detects the delimiter per file.
Why do £ signs or accents look wrong after combining?
The files use different text encodings. Re-save every file as CSV UTF-8 before combining.
Can I combine CSV and Excel files together?
Yes, as long as both are read into the same set of columns first. ConsoliSheet accepts CSV and XLSX in the same upload.
When the CSV files don’t agree
If your exports come from different systems, people or months, ConsoliSheet lines them up by header, keeps the columns only some files have, and shows you anything it can’t decide safely.
Jobs with up to five business columns are free and need no account. Source File doesn’t count towards the five. For bigger jobs, a free account includes one full consolidation, then it is $11.99 for a one-off or $19.99 a month for Pro. See pricing.
Combine your CSV files without lining them up by hand
Upload the CSV or Excel files. ConsoliSheet matches the columns by header, flags the problems and gives you one clean workbook.
Free for up to 5 business columns. No account needed.