CSV Joiner

Join / merge two CSV files on a shared key column (SQL-style LEFT JOIN)

Merge two CSV files on a shared key column with SQL-style INNER, LEFT, or FULL OUTER joins, using an in-memory hash-join for speed. Pick the key column on each side and the join type; the result is previewed and downloadable. Browser-only. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the difference between INNER, LEFT, and FULL OUTER?

INNER keeps only rows whose keys match in both files. LEFT keeps every left row, filling right columns with blanks where there is no match. FULL OUTER keeps all rows from both files, blanking the missing side.

Merge two CSVs on a shared key

The CSV Joiner combines two CSV files the way a SQL join does. Match rows on a shared key column — for instance an order file against a customer file on a customer ID — and choose whether to keep only matches (INNER), every left row (LEFT), or every row from both sides (FULL OUTER). The right table’s key column is not repeated in the output.

How it works

Both files are parsed with a quote-aware reader. The right table is then indexed into a hash map whose keys are the values of its join column, with each key mapping to the list of right rows that have it. This is a classic hash join.

The left table is scanned once. For each left row the tool looks up its key in the hash map: every matching right row produces one combined output row (left columns followed by the right columns except the duplicate key). In LEFT and FULL OUTER mode, a left row with no match still emits one row with the right columns left blank. In FULL OUTER mode, any right rows whose keys were never matched are appended at the end with the left columns blank and the right key copied into the key position. Because the right side is indexed once and the left side scanned once, the work is O(n + m).

Example and notes

Joining:

id,name        id,city
1,Ann          1,London
2,Bob          2,Paris
3,Cara         4,Berlin

on id with an INNER join yields two rows (ids 1 and 2). A LEFT join adds Cara with a blank city; a FULL OUTER join additionally adds Berlin (id 4) with a blank name.

Choosing the right join type

Join typeUse when…
INNERYou only want rows that exist in both files — for example matching orders to customers where you want to discard unmatched orders.
LEFTYou want every row from the left file, even if the right has no match — for example a customer list with their order count, keeping customers who have never ordered (their order column will be blank).
FULL OUTERYou want every row from both files, with blanks where a side has no match — useful for reconciling two lists and finding entries unique to each.

Handling duplicate keys

If a key appears multiple times on the right side, every left row that matches it gets multiplied — one output row per matching right row. This is the same cartesian behaviour as SQL. For example, if a customer placed three orders and you join the order table on the left to a customer table on the right, that customer’s row appears three times.

If you need exactly one result per left key, deduplicate the right file first using the CSV Deduplicator tool.

Tips

  • The right key column is not duplicated in the output; it is dropped to avoid redundancy.
  • Column name conflicts between the two files (other than the key) are handled by keeping both — the right file’s column is appended after the left’s columns.
  • Matching is case-sensitive. If your keys differ in casing across files, normalize them first in the CSV Cleaner.

All processing runs in your browser — nothing is uploaded.