Join Two TSV Files
Two exports, one shared identifier, and no database to load them into. This does the join for you: name the key column on each side, pick the join type, and get one table back with the columns of both. Column names that clash get a suffix so nothing is silently overwritten, and the status line reports how many rows matched on each side — which is the number that tells you whether the join was the one you meant.
How to use
- Paste or drop both files. Each needs a header row.
- Name the key column in A. If B calls it the same thing, leave the B field blank; if B calls it
user_idwhile A calls itid, fill both in. - For a composite key, comma-separate —
country,cityon both sides, in the same order. - Pick the join type (see below), then read the match counts in the status line before using the result.
Which join type
Inner keeps only rows whose key exists on both sides. Use it when you want the intersection and don't care what didn't match.
Left keeps every row of A, filling B's columns with blanks where there was no match. This is the default choice for enriching a list: A is your list of things, B is the lookup table, and blanks tell you which things weren't found. Right is the mirror image.
Full outer keeps everything from both sides, and is mainly a diagnostic — it's how you see at a glance which keys exist in only one file. For a proper comparison rather than a merge, TSV diff is the better tool.
What to watch for
Duplicate keys multiply rows. If a key appears twice in A and three times in B, you get six output rows for it — that's what a SQL join does too, and it's the single most common cause of a joined file being unexpectedly larger than either input. Check both key columns with value counts first; anything with a count above 1 is a multiplier.
Keys must match exactly. Comparison is literal: "42" and "42 " don't match, nor do ABC and abc. If your match count is suspiciously low, run both files through trim columns and check for case differences. Leading zeros are a classic offender — a key that went through Excel as a number will have lost them on one side only.
Column name clashes are suffixed, not merged. If both files have a name column, the output has name from A and name_b from B. Change the suffix if _b collides with something real. Key columns appear once, taken from A.
FAQ
Is this the same as merging two files?
No — and the distinction matters. A join combines files side by side matching on a key, widening the table. Merge stacks files on top of each other, lengthening it. If your two files have the same columns and different rows, you want merge.
Can I join more than two files?
One pair at a time: join A and B, copy the output back into the A box, then join with C. Each pass is independent, so you can use a different key each time.
What's the equivalent in SQL or pandas?
SELECT * FROM a LEFT JOIN b USING (id), or a.merge(b, on='id', how='left'). If you're doing this repeatedly on large files, loading them into SQLite (.mode tabs, .import) will be faster than a browser — see the schema generator for the DDL.
How big can the files be?
Both files plus the output are held in memory, and duplicate keys can make the output much larger than the inputs. A few hundred thousand rows per side is comfortable; millions is not.
Privacy
100% client-side. Neither file is uploaded. See the privacy policy.