Free browser tool

Merge CSV Files Online

Combine CSV files into one table, align matching column names, and download the merged result.

Merge CSV Files Online

Files are processed locally in your browser. No account required.

Choose CSV data to start.

Choose 2 to 20 UTF-8 CSV files, each at most 10 MB. Output limit: 100,000 data rows, 1,000 columns and 5 million cells. Preview shows up to 12 rows; download contains the full result. CSV output uses commas and UTF-8.

Example result

File A: id,name / 1,Ada. File B: id,age / 2,30. Output: id,name,age / 1,Ada, / 2,,30.

What CSV merge does

CSV merge combines multiple CSV files into one table by vertically appending data rows. All files must present a header row as their first line. The merge key is the exact text of each header cell, case-sensitive and including spaces: Name and name are two different columns. The tool builds the union of all header names seen across files, orders those columns in the order they first appear when scanning files in the sequence you selected, and writes one output header row using that unified list. Each file's data rows are mapped into that union: where a file has a column for a given header, values copy across; where a file lacks that header, blank cells are inserted. Duplicate header names within a single file are rejected, as are blank header cells or any data row whose field count does not match that file's header width. Files are read in the browser only; nothing is sent to a server. The preview shows the first twelve merged rows; the downloaded CSV contains all merged rows. Input CSV should be UTF-8. This page does not read Excel; convert workbooks separately first.

When merge fits your task

Merge suits combining monthly exports that share the same schema, appending new batches from a form export, or stitching regional files where some regions omit optional columns that should still appear in the combined file. It is the right tool when you want one long dataset with aligned columns, not when you want to join two tables on a key with different numbers of rows or aggregate duplicates. Merge preserves row order within each file and processes files in the order reported by the file picker, so earlier files' rows appear before later files' rows in the output. It does not sort, filter, deduplicate, or validate business rules. If two files use different spellings for the same concept, such as SKU versus sku, both columns appear in the union and you must fix headers before merge or clean the result afterward. Transpose is unrelated: it rotates one file. Merge never swaps rows and columns. If your problem is Excel worksheet content with formulas, export to CSV using displayed values first; merge only sees the text CSV representation.

Step-by-step workflow

Prepare each CSV at or under ten megabytes, within one hundred thousand data rows and one thousand columns per file, encoded as UTF-8. Confirm the first line of every file is the header row and that every subsequent line has exactly as many fields as that header, including empty fields represented by consecutive delimiters or trailing delimiters as needed. Confirm header cells are non-empty and unique within each file. On the merge page, choose the delimiter, select at least two files together and check the resulting row order, and run merge. The tool parses each file, validates headers and row widths, accumulates the union header list, appends mapped rows, then shows a twelve-row preview. Inspect header order and a few mapped rows, especially for files that lacked optional columns, to see blanks where you expect gaps. Download when satisfied to obtain the full merged CSV. If any file fails validation, the operation should report which problem occurred rather than producing a partial merge with misaligned columns.

Union headers, duplicates, and column order

Header union logic uses exact string equality on header names from the first row, with case sensitivity. The output column order follows first occurrence across the ordered file list: if file one has headers id, name and file two adds age, the merged header becomes id, name, age because age first appeared in file two after file one's headers were registered. If file two instead had name, id, age, the union order is still id, name from file one first, then age; file two's row values are placed under the correct union columns regardless of that file's local column order. Two headers that look alike but differ by case occupy two output columns. The tool does not rename, fuzzy-match, or collapse synonyms. Duplicate header names on the same first row are an error because the mapper would not know which physical column to read. Blank header titles are an error for the same reason. The merge does not preserve multiple header rows; only row one is structural, and all following lines are data.

Concrete merge example

File A, comma-delimited: first line id,name; second line 1,Ada; third line 2,Bob. File B: first line id,age; second line 3,30; third line 4,25. Union headers in processing order are id, name, age. Output header row: id,name,age. Output data rows: 1,Ada, with a blank third field; 2,Bob, blank third field; 3, blank name field, 30; 4, blank name, 25. File B rows gained an empty name column because name existed only in file A. File A rows gained an empty age column. If file B had mistakenly used Id instead of id, the union would treat Id as a separate column and file B's identifiers would land under Id while file A's stayed under id, which is usually unwanted and should be fixed by editing headers before merge. If a data row in file B had three fields but its header had two, merge rejects the file for inconsistent row width rather than silently dropping or merging fields.

Validation errors and how to fix them

Common failures include duplicate header names within one file, empty header cells, data rows with fewer or more delimited fields than the header count, files over ten megabytes, or grids exceeding row or column limits. Fix duplicate or blank headers in a text editor or spreadsheet by exporting CSV again with a clean single header row. Fix width mismatches by ensuring every data line has the same number of separators as expected; embedded line breaks inside quoted fields are fine, but unquoted stray commas create extra fields. Align delimiters with the selector on the page. If only some files use semicolon, normalize them before merge or merge in batches after conversion. Encoding issues often show as replacement characters or parse errors; re-save source as UTF-8. The preview helps catch logical mistakes such as two id columns after merge; those are data hygiene issues, not tool bugs. Remember merge does not check that id values are unique across files.

Limits and how merge differs from transpose and Excel export

Each input file shares the same caps: ten megabytes, one hundred thousand rows, one thousand columns, UTF-8 CSV. The merged output is capped at 100,000 data rows, 1,000 columns and five million cells; each run accepts up to 20 files. Merge appends rows; transpose rotates one file. Excel to CSV extracts one worksheet's displayed cell values to UTF-8 CSV without recalculating formulas or keeping colors, fonts, or number formats; that CSV can then be merged with others if headers validate. There is no Excel import on the merge page itself. Downloaded merge output uses comma delimiters with quoting as needed and includes every merged data row, not only the twelve-row preview. Failed validation on any single file should abort the merge with a descriptive error so you do not download a table built from an incomplete set. For related preparation tasks, standardize header spelling across exports, remove extra title lines above headers, and verify row counts in a terminal or editor before combining sensitive datasets.

CSV format reference

CSV fields may contain commas or line breaks when quoted correctly. See the CSV format specification RFC 4180 for common conventions.

Frequently asked questions

How are columns aligned?

Headers match exactly, including capitalization and spaces. Missing columns become blank.

Are duplicate data rows removed?

No. Every data row is retained in file order.

Is this a join by ID?

No. This appends rows; it does not match records side by side.