Join Two CSV Files Using a Shared Key
A CSV join connects rows from two tables using values that identify related records. For example, a customer list may contain a customer ID and contact details, while an orders file uses the same ID alongside purchase information. Select the key column in each file and the joiner combines matching records into one downloadable table.
Unlike a CSV merger that appends rows, a join adds fields from the second file beside the matching row from the first. You choose the join type to control what happens to records that have no match.
Choose the key columns carefully
The key columns do not need to have the same heading, but their values should refer to the same thing and use the same format. An ID in one file can match a Customer ID in another. Values are compared as text, exactly as they appear: capitalization and spaces matter. A value such as 00125 does not equal 125, and a blank key is not treated as a match.
Before joining, check that the key values are consistent. Remove accidental spaces, standardize capitalization if needed, and make sure identifiers have not lost leading zeroes during a spreadsheet export. If a key occurs multiple times in either file, the join can produce multiple output rows for that key.
Inner, left, and full joins
- Inner join: keeps only rows with a matching key in both files. Use it when you want records that appear in both datasets.
- Left join: keeps every row from the first file. Matching fields from the second file are added; fields are blank when no second-file row matches.
- Full join: keeps matched rows and unmatched rows from both files. For a right-only row, the selected right key is placed in the output key column, while other first-file fields are blank.
When the same key appears more than once, every matching pair is included. If a key appears twice in the first file and three times in the second, that key produces six matched rows. This is expected join behavior, but it can increase the result size.
Run the join and review the result
- Choose exactly two CSV, TSV, or supported delimited text files, each up to 50 MB.
- Select the key column from the first file and the corresponding key column from the second.
- Choose inner, left, or full join based on which unmatched records you want to keep.
- Select Join CSV Files, review the output rows, and download the combined CSV.
The result preview is paginated and shows a portion of the joined data at a time. The download contains the complete result. Quoted commas, line breaks, and quotation marks remain within their fields. The input files are not modified; the join creates a new CSV in your browser.
Understand the output columns
The output begins with the columns from the first file, followed by the non-key columns from the second file. The selected second-file key is not repeated because it serves as the match field. If the key headings differ, the output uses the first file’s selected key heading. When a non-key heading exists in both files, the second-file heading is labeled “(File 2)” to distinguish the columns. For unmatched rows kept by a left or full join, fields from the other file are blank.
The joiner does not deduplicate records, sort rows, or infer approximate matches. It uses exact key values. If you need to append all records without matching a key, use the CSV Merger or CSV Combiner. Explore all CSV tools for other workflows.
CSV JOINER FAQ
Questions About Joining CSV Files
What is a CSV join?
A join matches rows from two files using key values, then places related fields side by side in one result table.
Do the key columns need the same heading?
No. Choose the corresponding field in each file. The column names can differ, but the key values need to represent the same identifiers.
Are key matches case-sensitive?
Yes. Keys are compared exactly as text. Capitalization, spaces, and leading zeroes affect whether values match.
What does an inner join keep?
An inner join includes only records whose selected key appears in both files.
What is the difference between a left join and a full join?
A left join keeps every row from the first file. A full join also keeps unmatched rows from the second file.
Why did one key create several output rows?
When a key appears multiple times in both files, the join includes every matching pair. Check for repeated keys if the output is larger than expected.
What happens to blank keys?
Blank keys do not match. Their rows are included only when the chosen join type keeps unmatched records.
Can I join TSV files?
Yes. CSV, TSV, and supported delimited TXT files are accepted. The output downloads as CSV.
Are my files uploaded?
No. The files are read and joined in your browser. The original files remain unchanged.
Check the match quality before using the download
Review a few matched rows and the join summary before importing the result elsewhere. Confirm that the chosen keys identify the same entity in both files, check how unmatched rows were handled, and look for repeated identifiers that may multiply records. A carefully chosen key makes the joined table much easier to trust.