CSV Merge and Join

Join two CSV, TSV or Excel tables on one or more key columns and download the combined rows.

Files stay on your device No sign-up Free to use
How this works

The tool runs in this browser. Your file or text is not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.

Privacy details

Join the tables controls

Drop your table file here

or choose one from your device

One CSV, TSV, text or .xlsx file up to 20 MiB per table, 100,000 rows and 500 columns.

    Drop your table file here

    or choose one from your device

    Read with the same delimiter and quote settings as the first table.

      The table that keeps its rows. Paste CSV or TSV here, or leave this empty and choose a file. A quoted comma or line break inside a cell is read as one value.

      The table that is matched onto the first one, or choose a file below instead.

      One column name, or several separated by commas such as region,sku. Enter each name exactly as it appears in that table.

      Enter the same number of names as the first table, in the same order.

      A left join is the common choice when the first table is the list you care about.

      Change this when one table holds SKU-1 and the other holds sku-1.

      A key that repeats in both tables multiplies the output rows. The result is refused past 50,000 rows, and the repeat count is reported.

      A workbook download holds every cell as text, so a formula-looking value is never run.

      A precaution for opening the CSV in a spreadsheet. A cell that begins with = + - or @, including after leading spaces, receives a prefix so it is less likely to run. The prefix changes the stored value, and an app can still treat the cell as a formula after a save and reopen, so it is not a guarantee.

      More options

      Only for a first .xlsx file: the sheet name or its position, such as 2. Leave empty for the first visible sheet.

      Only for a second .xlsx file. Leave empty for the first visible sheet.

      Used only when Delimiter is set to Another character. Enter one character, such as ^.

      The stored value is what the spreadsheet last calculated. The formula text appears with a leading = and is never calculated here.

      How to use CSV Merge and Join

      1. Paste the first table into the first box, or choose its CSV, TSV or .xlsx file instead.
      2. Add the second table the same way, then set the delimiter or the worksheet if the detected one is wrong.
      3. 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.
      4. 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.

      You add
      First table: header id,name then rows 0012,Ana and 0013,Bo. Second table: header id,price then rows 0012,1.50 and 0014,9.99. Key column in the first table: id. Key column in the second table: id. Match rows: every first-table row.
      You get
      The result reports 2 joined rows with 1 match and 1 first row without a match, and downloads merged.csv with the columns _match,id,name,id_b,price. The 0013 row keeps its blank price, and the unmatched 0014 row is not included because the match type is first-table rows. Choosing the workbook download instead writes the same rows with every cell stored as text.

      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

      Each side is one CSV, TSV, text or .xlsx source, pasted or from a file, up to 20 MiB, 100,000 rows and 500 columns. Up to 4 key columns on each side, written as one name or several separated by commas. Quoted commas, quotes and line breaks inside a cell are read as part of that cell, and a cell holding 0012 keeps its leading zeroes because every value stays text. Repeated keys multiply matches rather than adding them, so a result past 50,000 rows is refused, and only the first table's row order is kept. An .xlsx source is checked from its ZIP directory and then unpacked with the browser's streaming decompressor, which stops a part that expands past the size its directory declares and gives up after 20 seconds; a browser without that decompressor is asked to save the sheet as CSV instead, and the read never falls back to an unchecked path. An .xlsx download holds at most 400,000 cells. A file saved as .xls, a macro workbook and a password-protected workbook are refused, and a formula cell in a read workbook arrives as the value the spreadsheet stored. Tables must stay within 2,000,000 cells; the preview shows a limited selection of rows.

      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.

      Project manager: Tony Hines · Content updated 4 October 2026 · Report a problem