Skip to main content

VERTICAL CSV MERGE · PRACTICAL GUIDE

How to merge CSV files vertically

Open the CSV merger

CSV files with the same columns can be stacked into one file, which is useful for monthly or branch exports. This guide shows how to keep one header, preserve file order, and catch column mismatches before merging.

Published:

Updated:

Related tool: Merge vertically

Stack matching CSV files into one output

When column names and positions match, you can keep the first file’s header and append every data row in order. LocaCSV merges 2–20 CSV files with a combined input size of up to 50 MiB into one CSV.

Try a vertical CSV merge

Reverse the file order to see the output rows move with it, or try a mismatched column order.

CSV files to merge

2 files

1july.csv

2 data rows

Order IDStoreAmount
A001London1200
A002Madrid850

2august.csv

2 data rows

Order IDStoreAmount
A003London640
A004Berlin2100

Merged result

4 output rows

merged.csv

One header row

Order IDStoreAmount
A001London1200
A002Madrid850
A003London640
A004Berlin2100

When a vertical CSV merge is the right choice

A vertical merge is for files that describe the same fields. It adds rows, unlike a key-based join that adds columns from a related table.

  • Consolidate monthly sales exports into a yearly file
  • Combine identical branch or store reports for head office
  • Reassemble CSV files exported in separate batches
  • Reduce the number of files before the next processing step

Which CSV merge method should you use?

The best approach depends on whether this is a small one-off job or a task you will repeat. Keep the source files and choose a method that lets you check for missing or duplicated rows.

Four ways to consolidate CSV files
MethodBest forAdvantageWatch for
ExcelA few small CSV filesYou can inspect data while copying itPaste position, repeated headers, and worksheet row limits
Power QueryRepeated imports from one folderA saved query can repeat the same stepsAutomatic type conversion and rejected rows need review
PythonScheduled or highly customized processingValidation and output rules can be automatedOngoing setup and upkeep are required
LocaCSVCSV files totaling 50 MiB or lessWorks in a browser and stops column mismatches firstRequires 2–20 files with matching names and column order
  • Excel

    Best for
    A few small CSV files
    Advantage
    You can inspect data while copying it
    Watch for
    Paste position, repeated headers, and worksheet row limits
  • Power Query

    Best for
    Repeated imports from one folder
    Advantage
    A saved query can repeat the same steps
    Watch for
    Automatic type conversion and rejected rows need review
  • Python

    Best for
    Scheduled or highly customized processing
    Advantage
    Validation and output rules can be automated
    Watch for
    Ongoing setup and upkeep are required
  • LocaCSV

    Best for
    CSV files totaling 50 MiB or less
    Advantage
    Works in a browser and stops column mismatches first
    Watch for
    Requires 2–20 files with matching names and column order

Merge CSV files in four steps with LocaCSV

If a preview looks wrong, change that file’s input encoding or delimiter before merging.

  1. Open Vertical CSV merge and select 2–20 CSV files.
  2. Check each preview, encoding, delimiter, and column-match status.
  3. Move files up or down until they are in the required output order.
  4. Confirm the output settings, run the merge, and save the CSV after input and output row counts match.
Merge vertically

File order becomes row order

Output rows follow the file list from top to bottom, and the row order inside each file is preserved. If july.csv is above august.csv, all July rows appear before August rows.

  • The first file supplies the single output header
  • Changing the order makes the new first file the header reference
  • Arrange files before running when chronological order matters

Check headers and the 50 MiB limit

Every column name and position must match the first file exactly. A file with “Store,Amount” cannot be merged with “Amount,Store”, because that could place values under the wrong columns.

  • Select between 2 and 20 files
  • Combined input size must be 50 MiB or less
  • The tool does not guess renamed, missing, or extra columns
  • Before completion, total input data rows must equal output data rows

When encodings or delimiters differ

Inputs may mix UTF-8, Shift_JIS, and other supported encodings or delimiters. Review or change settings per file; the output uses one selected encoding and delimiter.

  • Choose comma, semicolon, tab, or pipe separately for each input
  • Output supports UTF-8 with or without BOM, Shift_JIS, ISO-8859-1, CP949, Big5, GB18030, and Windows-1252
  • Characters unavailable in the output encoding stop the merge instead of being silently replaced