Skip to content

Merge (Combine) CSV Files Online

Merge (combine) many CSV or Excel files into one file, even when their columns don't match. Or join two files on a shared column, like a VLOOKUP that never breaks.

Runs in your browser. Your file is never uploaded.

    What it does

    Stacking puts files with the same kind of data under each other. Columns are matched by name, so a column that only one file has is kept rather than shifted out of place.

    2 files, different columns
    fileorder_idamountregion_manager
    sales-north.csvN-101360
    sales-south.csvS-201600Priya
    1 combined file
    order_idamountregion_managersource_file
    N-101360sales-north.csv
    S-201600Priyasales-south.csv

    Joining adds columns from a second file wherever a shared value matches, like a customer ID. It's a VLOOKUP that brings back every column at once.

    orders + customers
    order_idcustomer_id
    N-101C01
    N-102C04
    N-103C09
    Joined on customer_id
    order_idcustomer_idnamecity
    N-101C01Asha RaoPune
    N-102C04Tom BeckerBerlin
    N-103C09

    How to merge CSV files

    1. Choose Stack files to combine files with the same kind of rows, such as monthly or regional exports. Choose Join two files to bring columns from one file into another.
    2. Drop your files in. To stack, select them all at once: hold Ctrl (or Cmd on a Mac) to pick several, or drag a whole selection in.
    3. Check the preview and the row counts, then download the result as CSV or Excel.

    Stacking files whose columns don't match

    Exports from the same system drift over time: a column gets added, renamed or moved. Copy-pasting such files under each other in Excel silently puts values under the wrong header.

    This tool lines columns up by name. With Match headers ignoring case, spaces and underscores on, Customer ID, customer id and customer_id count as the same column. The list under the drop zone shows how many rows came from each file, and which columns are missing from it, so you can spot a file that doesn't belong.

    Joining: the three options

    • All rows of the main file (a left join). Rows without a match keep empty lookup columns. This is what VLOOKUP does, and the safest default.
    • Only rows that match (an inner join). Rows without a match on either side are dropped.
    • All rows of both files (a full join). Nothing is dropped; useful for reconciling two lists.

    Keys are compared as text after trimming spaces, so C01 and C01 match. They are case-sensitive, so c01 and C01 don't.

    Questions

    What if the files have different columns?

    Stacking matches columns by their header name, not their position. A column that only exists in some files is kept, and left empty for rows from the files that don’t have it. Columns in a different order are lined up correctly.

    Can I mix CSV and Excel files?

    Yes. You can stack .csv, .xlsx and .xls files together. For Excel files the first sheet is used.

    How many files, and how large?

    As many files as you like. When they add up to more than 20 MB, they are combined by DuckDB, a database engine that runs in this page and reads the files straight from your disk, so a set of files totalling several gigabytes works on a normal laptop. The merged file is written to disk as it is created, so even very large results download. The first time, your browser downloads the engine (about 30 MB) and caches it.

    What is the difference between stacking and joining?

    Stacking puts files on top of each other, so you get more rows; use it for monthly exports or regional files with the same layout. Joining puts two files side by side, matching rows on a shared column like a customer ID, so you get more columns; it does the same job as VLOOKUP.

    What happens when a key appears more than once in a join?

    Every match is kept, the same as in SQL. If customer C01 has two orders and appears once in the customer file, you get two rows, each with the customer details. The tool tells you when keys repeat in both files, which multiplies rows.

    Are my files uploaded?

    No. The files are read and merged by your browser and never leave your computer.