CSV Key Join
Joins two CSVs on a shared key column, adding the right table’s columns next to each left row. Columns with different names can be matched as customer_id=id, and when several rows match, all of them are joined.
- File, image, and document tools run in the browser, but originals may still contain personal or sensitive information. Review both source files and outputs before sharing or submitting them.
Joins two CSVs on a shared key column, adding the right table’s columns next to each left row. Columns with different names can be matched as customer_id=id, and when several rows match, al…
Example CSV Key Join result order_id,customer_id,total,name,grade A-1,C1,12000,Hana Kim,VIP A-2,C2,8000,Duri Lee,Standard A-3,C9,5000,, Next step: If you need only rows present on both sides, add inner after the key, for example: id inner.
How to use CSV Key Join
This tool connects two tables through a common column — adding customer names to an order list, or a price list to a table of product codes. For each row in the left CSV it finds the right rows with the same key value and appends their columns.
Write “id” in the key column field to compare the id columns on both sides; if the names differ, write “left column=right column”, as in “customer_id=id”. The default is a left join, which keeps unmatched left rows with empty cells; add “inner” to keep only rows that have a match.
If several right rows share a key, each produces its own row so no information is lost. When both sides have a column with the same name, the left value is not overwritten; the right column gets _2 appended to its name.
- Put the base table (for example an order list) in the left CSV field.
- Put the table with the information to add (for example a customer list) in the right CSV field.
- Write the key in a form such as id, customer_id=id or id inner in the key column field, and press Run.
Useful for
- Adding customer names and tiers to an order export to see sales by tier
- Joining the latest price list to product codes to find products missing a price
- Joining members and payments to find members with no payment history
- Matching tables from two systems on a common ID to build one report
Limits and checks
- Rows with an empty key are never joined to each other, which prevents unrelated empty keys from matching.
- If you need only rows present on both sides, add inner after the key, for example: id inner.
Worked example
Example input: Adding customer tiers to an order list
order_id,customer_id,total A-1,C1,12000 A-2,C2,8000 A-3,C9,5000 --- id,name,grade C1,Hana Kim,VIP C2,Duri Lee,Standard --- customer_id=id
Order C9 is not in the customer list, so a left join leaves it with empty cells. Adding inner removes this row.
Result
order_id,customer_id,total,name,grade A-1,C1,12000,Hana Kim,VIP A-2,C2,8000,Duri Lee,Standard A-3,C9,5000,,
Order C9 is not in the customer list, so a left join leaves it with empty cells. Adding inner removes this row.
Common issues
The result has more rows than the left table.
The right table has several rows with the same key, so one row was created per match. If you want one row each, deduplicate the right table by key first with the CSV duplicate remover.
Values that are clearly the same do not join.
Surrounding spaces are ignored, but case and digit differences such as “C01” versus “C1” count as different values. Align the key formats in both tables first.
How to interpret the result
Joins two CSVs on a shared key column, adding the right table’s columns next to each left row. Columns with different names can be matched as customer_id=id, and when several rows match, all of them are joined.
Related workflow
If you need only rows present on both sides, add inner after the key, for example: id inner.
Privacy and review notes
ToolBada runs this tool in your browser where it can. Use sample values instead of personal or confidential data, and review the result before relying on it.
FAQ
Can rows that exist only on the right be included?
Only left and inner joins are supported. To get rows that exist only on the right, swap the left and right fields and run it again.
Can I join on two columns combined?
Only one key column is used. If you need two, such as date and branch, create a column joining both values on each side and join on that.
What if the result is very large?
It stops with a message if the result exceeds 200,000 rows. This is usually caused by duplicate keys in the right table, so cleaning the keys first fixes it.