Skip to content
UniKit

TXT file merger

Merge several local TXT files — or pasted text blocks — into one text in any order, with optional file-name section headers, plain or custom separators, empty-line and duplicate removal, plus file, line, character and UTF-8 byte counts.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Files to merge

Select several .txt / .md / .csv / .log / .json files at once. Up to 2 MiB per file and 50 files per run; split bigger files first.

Merge order

No files added yet

Files are concatenated top to bottom. Use ↑ ↓ to reorder and × to remove.

Merge options

Section headers with file namesInsert a “===== file name =====” line before each file so the source stays visible.
Trim every line
Drop empty lines
Drop duplicate linesDe-duplicates across all files, keeping the first occurrence.

Merged text

Concatenated in the order above. Results above 5 MiB fail with an error instead of freezing the page.

Add files or paste a block of text to see the merged result

Files

0

Lines

0

Characters

0

UTF-8 bytes

0

Empty lines dropped

0

Duplicate lines dropped

0

What this tool does

  • Stitch split TXT dumps (multi-part chapters, rotated logs, database exports) back into one text and mark each source with a file-name section header
  • Turn on “Drop duplicate lines” and “Drop empty lines” to clean merged lists or configs without hand-comparing them in an editor
  • Download the merged result as merged.txt, or use the line and UTF-8 byte counts to confirm nothing was missed and nothing blows an API limit

Example

Input

apple
banana
banana

Output

apple
banana

The example is a single file with “Drop empty lines” and “Drop duplicate lines” on: the trailing blank line is removed and the second “banana” is dropped because the first occurrence wins.

Frequently asked questions

Are my files uploaded anywhere?

No. The site has no backend: files are read into memory by the browser File API and merged by page-side JavaScript, so you will see no upload request in the network panel.

Why the 2 MiB per file, 50 files and 5 MiB output limits?

The merged result lives in a single JavaScript string in memory, and huge strings stall the tab. Files above 2 MiB are rejected, more than 50 files raises an error, and the result is byte-estimated against a 5 MiB cap before joining. Split large files first.

Is “Drop duplicate lines” per file or across files?

It compares across all files and keeps the first occurrence in merge order. The “Duplicate lines dropped” statistic reports how many lines were removed.

How do I change the merge order?

Use the ↑ ↓ buttons in the “Merge order” list and the result updates immediately; manual reordering beats re-picking files when the browser sorts your selection differently.

I still see extra blank lines between files.

Files are joined with a newline by default, so a file that ends with a blank line produces one extra blank line at the seam. Turn on “Drop empty lines”, or pick “Custom separator” and leave it empty for exact control.

Keywords:merge txt filescombine text filestext file mergertxt-merge

Related tools