Skip to main content
1 min read
By Chieyine Nelson

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.

Need to handle CSV files?

HappyCSV is the free, secure way to merge, split, and clean your data — all in your browser.