How to Join Two CSV Files by Column
Join CSV files by email, ID, SKU, or another shared column. Learn the difference between a CSV merge and a database-style join.
Joining is different from merging. A merge stacks rows vertically; a join matches rows horizontally using a shared key such as an email address, customer ID, or SKU.
Example
customers.csv:
customer_id,name
101,Ada Lovelace
102,Grace Hopper
orders.csv:
customer_id,total
101,120
102,95
A join produces one row per matching customer with both the customer and order columns.
Join types
- A left join keeps every row from the first file.
- An inner join keeps only matching rows.
- A right join keeps every row from the second file.
- A full join keeps all rows and leaves unmatched cells blank.
- An anti join shows rows in the first file that have no match.
Open Join CSV Files to upload both files, choose the two key columns, and download the result. The operation runs in your browser, so the source files are not uploaded.
Before joining, trim whitespace and standardize casing in the key columns. ada@example.com and ada@example.com will not match until they are normalized.
Related Articles
Convert CSV Latitude and Longitude to GeoJSON
Convert latitude and longitude columns into GeoJSON point features for maps, GIS software, and location-data workflows.
Convert CSV to ICS Calendar Events
Convert rows with dates and event details into an ICS file for Google Calendar, Outlook, Apple Calendar, and iPhone.
Convert CSV to NDJSON JSON Lines
Convert every CSV row into newline-delimited JSON for APIs, logs, BigQuery, and data pipelines.
Need to handle CSV files?
HappyCSV is the free, secure way to merge, split, and clean your data — all in your browser.