How to use CSV Merge and Join
- Paste the first table into the first box, or choose its CSV, TSV or .xlsx file instead.
- Add the second table the same way, then set the delimiter or the worksheet if the detected one is wrong.
- Name one key column on each side, or several separated by commas such as region,sku, then choose the match type and select Join the tables.
- Check the row counts and the repeated-key notes, then download merged.csv or the workbook.
Example: CSV Merge and Join
Attach prices to an order list when one order has no price row.
Options
- Match rows
- Only rows in both tables keeps the intersection. Every first-table row keeps the first list intact and leaves the second side empty where there is no match. Every second-table row does the same from the other side. Every row from both tables adds the unmatched rows from both lists.
- Key columns
- Enter one column name on each side, or several separated by commas. Use the same number of names on both sides and keep them in the same order, so region,sku on the left pairs with region,sku on the right. A value that contains the separator cannot be mistaken for two separate values.
- Compare keys
- Exactly as written is the strictest setting. Ignoring spaces at the ends helps when one export pads a value. Ignoring spaces and letter case helps when one table holds SKU-1 and the other holds sku-1.
- Column names that collide
- Both key columns are kept, so the second table's id becomes id_b in the download. That is why a merged row can appear to hold the key twice; the two values are the two original cells.
- When a key repeats
- A key that appears more than once on both sides produces every combination, so two rows on each side become four merged rows. The repeated-key count and the keys that repeat most are reported, and a result past 50,000 rows is refused instead of building an unreadable file.
- Download format and formula protection
- A CSV download guards a cell that could run as a formula in a spreadsheet. A workbook download stores every cell as text instead, so a formula-looking value never runs and no prefix is added; the summary says how many cells look like that.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
A join is not a stack
Combining two files by stacking them appends rows; a join attaches columns from the second table onto rows of the first where the keys agree. If both files hold the same columns and you want one longer file, use a cleaner or concatenation instead. The row counts in the summary separate matched rows from unmatched ones so a silent mismatch is visible.
Why a many-to-many key is dangerous
One order number usually appears once per file. When it appears four times on each side, the join produces sixteen rows, and it is easy to read that as real data. The repeated-key count, the list of the keys that repeat most and the 50,000-row cap exist so a mistaken key shows up as a warning or a clear refusal rather than a surprise download.
Text stays text on both sides
Every value is kept as the characters it arrived as, so a part number such as 0012 does not lose its leading zeroes on the way through the join. The workbook download keeps that promise by storing each cell as an inline string, and the CSV download keeps it by quoting the value. Neither path converts a cell to a number, which is why the two downloads agree on the same join.
Questions about CSV Merge and Join
Can I join on more than one column?
Yes. Enter each key column on its own side of the comma, such as region,sku, and use the same number of names in the same order on both tables. Every listed column has to match before a pair of rows is joined.
Why does my merged file hold the key column twice?
Both keys are kept on purpose, and the second one takes a _b suffix. Keeping them shows which key value came from which side when the two tables spell a key differently, such as a padded value on one side.
What does the _match column mean?
It labels each output row: both when the key was found on each side, first only for a first-table row with no match, and second only for a second-table row with no match.
Can I join an Excel file with a CSV file?
Yes. Either side can be a .xlsx file, and you can name the worksheet to read. The other side can be pasted text or a CSV or TSV file, using the same delimiter and quote settings. Reading a workbook needs the browser's streaming decompressor, so an older browser is told to save the sheet as CSV instead.
A key repeats in both tables. Why was my result refused?
Repeated keys multiply the matching rows rather than adding them. Set When a key repeats to use only the first matching row, or clean the duplicates out of one side first. The summary names the keys that repeat most so you can see which one is expanding.