CSV Merger — Combine Files by Column Name

About this tool

Combine CSV and TSV files even when their columns appear in different orders. Columns are matched by header name; columns present in only some files are kept, with blanks in the others. You can merge files with different encodings and optionally record the source filename. All processing happens entirely in your browser (no data is sent).

1. Choose CSV files to merge

Drop files here Files with different column orders and encodings are supported.

Select files to begin.

Files are merged in the order shown; row order within each file is preserved. Encoding and delimiter detection are estimates, so check each file's preview.

2. Match columns and choose an output format

CSV merge settings

Header names are case-sensitive and distinguish full-width and half-width characters. Output columns begin with those in the first file, followed by newly encountered headers in subsequent files.

Choose files and review their input previews.

How to use

  1. Choose the CSV files to merge. Open each file's preview to check for garbled text or incorrect delimiters. Set the encoding and delimiter for individual files when needed.
  2. Use the Up and Down buttons to arrange the files. The first record of each file is treated as its header.
  3. Choose header trimming, source filename tracking, output encoding and line endings.
  4. Select “Validate and merge”. Check the result's headers and row counts, then select “Save merged file”.

Example: merging files with different column orders

The first file contains SKU,Product,Price, and the second contains Price,SKU,Stock. The output columns become SKU,Product,Price,Stock. Product is blank for rows from the second file, Stock is blank for rows from the first, and Price is aligned by name. Try the included sample to see this in action.

For a walkthrough with screenshots, see how to merge CSV and TSV files by column name.

Merge behavior and limitations

  • Each input file must have a first record containing unique, nonempty column names.Duplicate headers, records with missing or extra fields, and unclosed quotes cause validation to stop with the location of the error. Blank records are also treated as data; their field counts must match.
  • Columns found only in later files are added to the output. Rows and duplicate records are not removed, and numbers or dates are not converted. Quoting and record endings follow the selected output format.
  • Leading zeroes and long numeric identifiers remain text in the saved file. Excel may separately convert values to numbers, dates or formulas when opening CSV files. Use Excel's “From Text/CSV” import and specify column types where necessary.
  • Encoding and delimiter detection are estimates. Check the input previews. If a character cannot be represented exactly in the selected output encoding, processing stops instead of replacing it with ? or another substitute.
  • Limits: 200 input files totaling 256 MiB, 128 MiB merged output, 2,000 output columns and 4,194,304 characters per record. Processing runs in a Worker and reads files in chunks. Ensure sufficient memory and disk space to save the result.
  • All inputs are validated before being read a second time to construct the output. Cancelled or failed jobs do not create a download link. Changing files or settings clears the previous result, so save it before making changes.

Split CSV by record count or file size · Convert text encoding · Convert between CSV and JSON