ConsoliSheet

CSV Combiner: How to Combine Multiple CSV Files Into One

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.

Quick answerFor identical CSVs (same headers, same order, same delimiter), stack the files and keep only the first header row. A command line, Power Query or any CSV combiner will do that. If the headers differ in order, spelling or number of columns, don’t join the files as text. Read each one as records, line the columns up by header name, leave blanks where a file has no value, and record which file each row came from.

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%
Joined as text
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%
Combined by header
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
Joined as text, the semicolon file collapses into single cells, a second header row becomes data, and the Discount value lands in a column with no header. Combined by header, every value lands under the right column, the extra Discount column is kept, and each row records the file it came from.

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.

A quieter trap: PowerShell’s 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

1. Read each file as records, not text. Open or import each CSV with its own delimiter and encoding, so every row becomes named fields.
2. List the columns you want in the result. Usually every distinct column across the files, in a sensible order.
3. Match each file’s headers by name. Differences of case, spacing, underscores or hyphens are safe to treat as the same column. Different words, such as “client” and “customer”, need a human decision.
4. Leave genuine gaps blank. If one file has no Discount column, its rows get an empty Discount value rather than borrowing the next column.
5. Record the source. A Source File column lets you trace any odd value back to the export it came from.

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.
Need a CSV at the end? ConsoliSheet produces an Excel workbook. Open it in Excel and use File › Save As › CSV UTF-8. CSV files must be UTF-8 (with or without a BOM). If a file won’t read, re-save it as CSV UTF-8 first.

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.

Sources checked September 2026: Microsoft Learn, Combine CSV files in Power Query and Export-Csv.
Where ConsoliSheet fits

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.

Try it with your CSV files →

Every spreadsheet. One clean dataset.

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.