Skip to content
FreeNo account needed

Merge CSV files into one table.

Stack two or more CSV files into one table, even when the columns don't quite match.

Merge CSV files

Merging workbooks instead? Use the Excel merger.

  • Up to 50 files
  • Mismatched columns fixed
  • CSV or Excel back
  • Uploads deleted within the hour
mammoth.io/tools/merge-csv-files
  1. 1Files
  2. 2The table
  3. 3Preview
  4. 4Your file

3 tables read

Their columns don't all match. The next step sorts that out.

✓sales-jan.csv4 columns
✓sales-feb.csv4 columns
✓sales-mar.csv4 columns

Drawn from a real run of the merge tool. Try it with the same three files: sales-jan.csv, sales-feb.csv and sales-mar.csv.

  • Arla Foods logo
  • Bacardi logo
  • British American Tobacco logo
  • Everest Detection logo
  • Golden Acre logo
  • Handlangers logo
  • Inspired Learning Group logo
  • Kantar logo
  • MUFG logo
  • NielsenIQ logo
  • PTI Digital logo
  • RethinkFirst logo
  • Starbucks logo
  • The Specialist Works logo
What you get

One table, even when the columns don't match

Use it on its own, or have Mammoth merge next month's files for you.

  • Fixes columns that don't match

    It matches names like Amount and Total Amount. Anything else, you match with one click.

  • See it before you get it

    The preview shows where each file starts, so a bad match is easy to spot.

  • Free, and your files are deleted

    No account. Your uploads are deleted within the hour.

How it works

How to merge CSV files

If every file has the same columns in the same order, any merger will do. These steps are for when they don't.

  1. sales-jan.csv
    sales-feb.csv
    sales-mar.csv
    1

    Add your files

    Up to 50 files, 100 MB each and 400 MB in total.

  2. JanFebMar
    Date●●●
    Amount●●●
    Region●●?
    2

    Check the grid

    Each column gets a row and each file gets a column. Dots show what's filled.

  3. JanFebMar
    Date●●●
    Amount●●●
    Region●●?

    Mar: Sales Region fills Region

    3

    Fix what doesn't match

    Click a cell and pick which column fills it. It shows you sample values.

  4. Jan12,400
    Jan9,870
    Feb11,020
    Feb13,550
    XLSXCSV
    4

    Check the join, get the file

    The preview shows where each file starts. Pick CSV or Excel and we email it to you.

Try it on your files

Drop the files in, check the columns, and get one table by email.

Merge CSV files
Your options

Other ways to do it

If your files already match, you may not need this.

  • The command line

    Files that already match

    • Free: Yes
    • Handles renamed columns: No
    • Shows what doesn't line up: No
    • No email needed: Yes
  • Excel Power Query

    A folder of matching files

    • Free: Partly
    • Handles renamed columns: No
    • Shows what doesn't line up: No
    • No email needed: Yes
  • Copy and paste

    Two or three small files

    • Free: Yes
    • Handles renamed columns: Partly
    • Shows what doesn't line up: No
    • No email needed: Yes
  • This merger

    Files whose columns drifted

    • Free: Yes
    • Handles renamed columns: Yes
    • Shows what doesn't line up: Yes
    • No email needed: No
Every month

Merging files every month?

Mammoth can do it for you. Put the files in a folder and each one is added to the same table automatically.

Try Mammoth free

Monthly exports

Januarysales-jan.csv
Februarysales-feb.csv
Marchsales-mar.csv
DriveDropboxOneDriveSFTP
All monthsUp to date
Jan 04North12,400
Jan 11South9,870
Feb 03North11,020
Feb 10South13,550
Mar 02North10,310

Illustration. Every new file in the folder is added to the same table.

Set it up yourself in three steps, or reply to the tool's email and we'll help.

  1. 1

    Put the files in a folder

    Upload them to a folder in Mammoth, or collect them from Google Drive, Dropbox, OneDrive or SFTP on a schedule.

  2. 2

    Add them to one table

    Add a Data Consolidation step on that folder and set it to Combine. Each new file is added to the same table.

  3. 3

    Set the column matching once

    Mammoth remembers which column goes where. A file that doesn't match is held back, and you get a notification.

Your files stay private

Your uploads are deleted within the hour. The merged file is sent to the email address you enter.

  • SOC 2 Type II
  • ISO/IEC 27001:2022
  • HIPAA
  • GDPR

How we handle your data

  1. You upload

    sales-jan.csv and 2 more

  2. You check the merge

    No account needed

  3. File emailed to you

    To the address you enter

  4. Uploads deleted

    Within the hour

    < 1 hour

You'll also get the occasional email about working with files like these. Unsubscribe in one click.

FAQ

Questions people ask

Still not sure? Try it with your own file.

The files have different columns. Will it work?
Yes, that's what it's built for. It matches names that differ in case or wording, like amount and Total Amount. A column it can't place is kept, and you can pick which column it fills with one click.
Does it drop a column that only one file has?
No. Every column from every file is kept by default, and the other files are blank in it. Or pick one file's columns as the shape and leave the rest out.
Can't I just use the command line?
If your files match exactly, yes. If one file has an extra or renamed column, the rows stop lining up and nothing warns you.
What do I get back?
One table, as a CSV or an Excel file. You choose at the last step.
My files use semicolons, not commas.
That's fine. It detects commas, semicolons, tabs and pipes in each file.
The header isn't on the first row.
It finds the header row. Anything above it is shown to you, so you can see what was skipped.
Two of my files might be the same export.
It checks for that first. If two files have the same rows, it says so and asks whether to use just one.
Can I see which file each row came from?
Yes. Tick Add a Source file column on the preview step. You can also change the order the files are stacked in.
Do I have to give an email address?
Yes, at the last step, after you've seen the result. We send the file there, plus the occasional note about this kind of work. Unsubscribe in one click. Your uploads are deleted within the hour either way.
I have to do this every month.
Mammoth can do it for you. It remembers how your columns match and adds each new file to the same table.

Merging files every month?

Mammoth remembers how your columns match and merges each new file for you.

  • Free trial
  • No credit card
  • Viewers always free