Skip to main content

locacsv.comJoin Two CSV Files by a Common Key

Join CSV files by a common key

Join Two CSV Files by a Common Key

Select a shared column, such as a product code or employee ID, to combine related fields from two CSV files into one row. Both files stay in your browser.

CSV processing stays in your browser

Your files are not uploaded to a server.

File selection

Choose 2 CSV files, up to 50 MiB total. They are processed in left-to-right order. File names and contents are never sent outside your browser.

Drag and drop CSV files here

Up to 2 CSV files, 50 MiB total

Import settings
Auto-detection covers only UTF-8 and Shift_JIS. For CSV files from mainland China, Korea, Taiwan, or Western Europe, select the matching encoding manually.

How it works

Add product names to sales data by product code

Join matching product-code rows from the sales CSV on the left and the product CSV on the right.

Left CSV

sales.csv

2 columns · 1 row
Left CSV: sales.csv
Product codeQuantity
P012

Right CSV

products.csv

2 columns · 1 row
Right CSV: products.csv
Product codeProduct name
P01Apple

Output example

3 columns · 1 row
Output example
Product codeQuantityProduct name
P012Apple
The left table shows the input, and the right table shows the output.

Choose between keeping only matched rows or keeping every row from the left CSV.

Join two CSV files by key

Combine rows that share a key such as Product Code or Employee ID.

Features

  • Choose whether to keep only matched rows or every row from the left CSV.
  • Match repeated keys and review matched and unmatched row counts.

How it works

  1. Choose the left CSV, then the right CSV.
  2. Select one key per file and choose which rows to keep.
  3. Review the preview and row counts, then download.

Before you start

  • Limits: 50 MiB total and one key per file. Blank keys do not match.
  • Repeated keys on both sides can increase output rows; deduplicate first if needed.
View FAQs for this tool

Refine joined data with Select columns or Filter rows.