How to Join Two CSV Files on a Shared Column
Combine two CSV files by matching a shared column such as customer ID, email, or SKU. Your files stay on your device.
Sometimes two CSV files belong together. One file has orders and a customer ID. Another has customer names and the same ID. Joining them lets you put the matching information into one new CSV.
You do not need to copy rows by hand or build a long spreadsheet formula. You choose the matching column in each file and the tool combines the rows that belong together.
What joining two CSV files means
Think of the first CSV as your main list and the second CSV as the extra information you want to add.
For example:
orders.csv
customers.csv
Match customer_id in the first file with id in the second file.
joined.csv
The column names do not have to be the same. The values just need to identify the same thing on both sides.
Choose a good matching column
A useful matching column is something stable, such as:
- customer ID,
- order ID,
- product SKU,
- email address,
- another code that means the same thing in both files.
Avoid matching on names when a proper ID exists. Two people can have the same name, and the same person can appear with slightly different spelling.
Spaces around a value are ignored. Letter case is normally important, but you can choose to ignore case when ABC and abc should count as the same value.
Pick the join type you need
| Join type | What stays in the result | Good for |
|---|---|---|
| Inner | Only rows that match in both files. | Finding records that exist on both sides. |
| Left | Every row from the left file, plus matching information from the right file. | Adding customer or product details to a main list without losing left-side rows. |
| Full | Every row from both files, including unmatched rows. | Finding what matches and what exists on only one side. |
If you are mainly adding extra details to a main file, a left join is usually the easiest choice.
Decide what repeated keys should do
Sometimes the same matching value appears more than once in the second file.
You can choose:
- the first matching row,
- the last matching row,
- every matching row.
Choosing every match can create several output rows from one row in the first file. That is correct when the repeated rows are meaningful, but surprising when the duplicates are accidental.
If you do not expect duplicates, check the duplicate count in the result before you use the joined file.
How to join two CSV files
- 01
Add the left file
Choose your main CSV and check the tool page for the current file-size limit.
- 02
Add the right file
Choose the CSV that contains the information you want to match. The tool page also shows the combined-size limit.
- 03
Choose the matching column in each file
The column names may be different as long as their values refer to the same thing.
- 04
Choose inner, left, or full join
Pick the result that matches your goal.
- 05
Choose how repeated keys should be handled
Use the first, last, or every matching row from the right file.
- 06
Run the join and check the counts
Review matched and unmatched rows before downloading the new CSV.
Check the result before you use it
The result shows how many rows matched and how many did not.
If you expected every order to have a customer, but many left-side rows are unmatched, check the matching columns and the values inside them. A missing prefix, different letter case, or changed ID can stop a match.
If the result has more rows than expected, check whether the right file contains repeated keys and whether you selected every match.
Open the downloaded CSV once before replacing any original file or sending the result to another system.
What happens to your files?
Both CSV files are processed on your device. They are not uploaded to our servers.
The original files are not changed. The tool creates a separate joined CSV for you to download.
This is useful for customer lists, order exports, product catalogs, and other files you would rather not upload.
Practical limits
The tool page shows the current per-file and combined-size limits from the shipped configuration.
Files above those limits are not supported by this tool. For larger joins, use a database or another data tool designed for larger files.
Simple example
You have 500 orders in one CSV and 480 customers in another. After a left join, the result shows 492 matched orders and 8 unmatched orders.
Those 8 rows are the ones to investigate. They may contain an old customer ID, a typo, or a customer that is missing from the second file.
Result: one joined CSV, plus clear unmatched rows to review.
Join your CSV filesSee the transformation
Two tables meet on one exact lookup key.
Add matching customer details to each order while keeping missing or repeated matches visible.
Need to do this now?
Join your CSV filesRelated tools
Open the tool this guide is about, or explore a related one.
- Compare CSV files online freeCompare two CSV files and review added, removed, and changed rows directly in your browser.
- CSV column mapper and renamerRename, reorder, and remove CSV columns before importing data into a CRM, store, database, or accounting system — without uploading your file.
- Clean and fix CSV files — no uploadRepair common CSV problems including wrong delimiters, uneven rows, empty lines, whitespace, BOM markers, and duplicate headers.