CSV Merge
Append rows from several CSV files into a single table, matched by column name or by position.
What this tool does
CSV Merge reads every file you hand it and writes one CSV carrying the rows of all of them, in the order the files were listed. Parsing respects quoting: double quotes around a field let it hold the delimiter, and even a line break, as ordinary text, while two quote marks in a row inside such a field mean one literal quote. Left on automatic, the separator is worked out for each file on its own, so a comma export and a semicolon export can go into the same job; name a delimiter by hand instead and it applies to all of them. What the merged file is written with is a separate choice.
With "Every file starts with a header row" ticked, columns are lined up by their names rather than their positions, so a file that puts name before id still lands in the right columns. Matching ignores case and surrounding spaces, and the heading printed at the top of the result keeps the spelling used by the first file that had it. One radio then decides the shape of the output: every column found, the default, keeps the union and leaves an empty cell wherever a file had nothing to give; only the first file's columns discards anything the later files added; only columns present in every file keeps the overlap, and refuses the job with an explanation when the files turn out to share no names at all.
Untick the header box and the files stack by position instead. The widest row anywhere in the batch fixes the column count, shorter rows gain empty cells to reach it, cell one meets cell one, and no header line is written — unless you also switch on the source-file column, in which case the result gains a header row reading source_file, column_1, column_2 and so on. The remaining switches work on rows rather than columns. The duplicate filter compares a whole row after alignment and keeps the first copy, so it catches a record that appears in two exports. Dropping empty rows is on by default and removes rows whose every cell is blank.
The work happens in this browser tab — the files are read, merged and offered back as a download without leaving your machine — and the practical limits follow from that and from what the code actually does. Every file is held in memory at once, so a handful of large exports will make the tab work for it. Text is decoded as UTF-8, so a file saved in an older Windows codepage arrives with its accented characters mangled, and the merged file is written as UTF-8 with no byte-order mark. Most importantly, this appends rows; it does not join on a key. Two files sharing an id column produce one table with both sets of rows stacked under each other, not one row per id with the columns combined.
How to use it
- Choose the files. Pick the .csv, .tsv or .txt files to combine — they are merged in the order they are listed. A single file is accepted too, and comes back as one .csv carrying a -merged suffix.
- Say whether the files carry a header row. Ticked, the first line of each file is treated as column names and used for matching. Unticked, the files line up by position and every line counts as data.
- Decide which columns survive. Every column found keeps the union and pads the gaps; only the first file's columns trims to that file's header; only columns present in every file keeps the overlap.
- Add a source column or filter rows. A source_file column records which file each row came from. The duplicate and empty-row switches drop rows before they are written out.
- Set the delimiters and run. Leave the input delimiter on automatic or name it per job, and pick comma, semicolon, tab or pipe for the output. The summary reports files in, rows and columns out, and any rows that were dropped.
Processing & privacy
Runs on your device. Your file is processed directly in this browser.
Common use cases
Rejoining monthly exports
Twelve reports with the same headers become one table, so a year can be counted, sorted or charted in a single pass instead of twelve.
Two exports whose columns are in a different order
Name matching puts each value under its own heading, so neither file has to be rearranged by hand before they can be stacked.
Pooling responses from several forms
Different forms collect overlapping fields. The union setting keeps every question asked and leaves a blank where a form did not ask it.
Preparing one file for an importer
Import screens usually accept a single upload. Merging first turns a folder of partial exports into the one file the screen will take.
Tracing a row back to where it came from
With the source column on, every row names its own file, which is what makes a merged table auditable once a figure looks wrong.
Questions
Are my files uploaded anywhere?
Can it join two files on a shared ID?
What happens when the files have different columns?
One of my files has two columns with the same header — what happens?
What counts as a duplicate row?
Can the delimiter be detected wrongly?
Does it change the values in my cells?
How many files, and how large?
Related tools
- JSON to CSV — Flatten a JSON array into a CSV table.
- CSV to JSON — Turn a CSV file into structured JSON.
- CSV Viewer — Open and browse a large CSV without a spreadsheet app.
- CSV to Excel — Convert CSV files into an XLSX workbook.
- Excel to CSV — Export spreadsheet sheets to CSV.
- CSV Split — Split a large CSV into smaller chunks.