Text File Merger

Merge multiple text files into one with custom separators.

Click to select text files, or drag & drop them here

50MB Max Per File & 200MB Max Total | Text files only (.txt, .csv, .json, .html, .md, .py, .js, etc.)

Your merged text will appear here.

What Is Text File Merger?

Text File Merger combines multiple text files into a single merged output. Upload your files, reorder them, choose a separator, click Merge Files, then copy or download the result — all directly in your browser. This tool runs 100% client-side. Your files are never uploaded to any server.

It supports 30+ text file formats (.txt, .csv, .json, .html, .md, .py, .js, .xml, .sql, .log, and more) with a 50MB per-file and 200MB total size limit. Features include custom separators, optional filename headers, drag-and-drop upload, file reordering, IndexedDB persistence across page refreshes, and a dedicated merge workflow with copy and download.

How to Use This Tool

1

Add Your Files

Click Add Files to select text files, or drag and drop them onto the input area. Multiple files can be added at once. Supported: .txt, .csv, .json, .html, .md, .py, .js, .xml, .sql, .log, and 20+ more formats. Per-file limit: 50MB. Total limit: 200MB.

2

Organize & Configure

Reorder files using the ↑ ↓ buttons. Choose a separator (newline, double newline, or custom text). Enable 'Add filename headers' to label each file's content with its filename in the output.

3

Merge Files

Click the Merge Files button to combine all files into the Output area. Review the merged text in the scrollable output. The merge uses the current file order and separator settings.

4

Copy or Download

Once merged, click Copy Merged to copy to clipboard, or Download Merged to save as merged.txt. Your files and output persist across page refreshes. Click Clear All to reset everything.

Features Explained

Drag & Drop Upload

Drag text files from your file explorer directly onto the input area. The area highlights when files are dragged over it. You can also click Add Files to open a file picker. Multiple files can be added at once or in batches.

File Reordering

Use the ↑ and ↓ buttons next to each file to change its position in the merge order. Files are merged top to bottom in the order shown in the input list.

Custom Separators

Choose how files are separated in the output: single newline, double newline, or a custom string (like '---', '===', or any text). The separator is inserted between each file's content during merge.

Filename Headers

Enable 'Add filename headers' to insert a labeled header (=== filename ===) before each file's content. Useful for identifying which content came from which file in the merged output.

Merge Workflow

The tool uses a deliberate merge workflow: add files, configure settings, then click Merge Files to generate the output. This ensures you can organize and verify everything before merging. Copy Merged and Download Merged buttons activate only after a successful merge.

File Size Limits

Each file can be up to 50MB, with a 200MB total combined limit across all files. Files exceeding these limits are rejected with a clear error message. These limits protect your browser from running out of memory.

30+ Supported File Types

Accepts text-based files including .txt, .csv, .tsv, .log, .md, .json, .xml, .yaml, .yml, .html, .htm, .css, .js, .ts, .py, .java, .c, .cpp, .sql, .ini, .env, .toml, .conf, .properties, .rst, .tex, .rtf, .srt, .sub, .vtt, .svg, .sh, and .bat.

IndexedDB Persistence

Your uploaded files, merged output, separator settings, and filename header preference are saved to IndexedDB. Refreshing the page restores everything exactly as you left it. Only clicking Clear All removes all stored data.

Copy & Download

Copy Merged copies the full merged text to your clipboard. Download Merged saves it as a merged.txt file. Both buttons are available after clicking Merge Files.

Individual File Removal

Click the × button next to any file to remove it from the list. You can then re-merge with the updated file list.

Who Is This Tool For?

Developers

Merge multiple source files, config files, or SQL scripts into a single file for deployment or review.

Writers

Combine chapters, sections, or notes from separate text files into a complete document.

Data Analysts

Merge CSV or log files from different sources into one file for processing or analysis.

System Administrators

Combine log files from multiple servers or time periods into a single file for troubleshooting.

Students

Merge research notes, outlines, and drafts from separate files into a final submission document.

Content Creators

Combine subtitle files, transcript segments, or content drafts into unified documents.

Tips for Merging Text Files

Use filename headers for large merges

When merging many files, enable 'Add filename headers' so you can find where each file's content starts in the output.

Custom separators for structured output

Use a custom separator like '---' or '===' to create clear visual breaks between files in the merged output.

Reorder before merging

The order of files matters. Use the ↑ ↓ buttons to arrange files in the correct sequence before clicking Merge Files.

Add files in batches

Click Add Files multiple times or drag multiple batches — new files are appended to the existing list, not replacing it.

Re-merge after changes

If you add, remove, or reorder files after merging, click Merge Files again to update the output with the new configuration.

Your work persists

Files, output, and settings are saved to IndexedDB. Refresh the page and everything is restored. Only Clear All removes stored data.

Privacy & Security

This tool runs 100% in your browser. Your files are never uploaded to any server. All merging and file generation happens locally using JavaScript. Files and output are stored in IndexedDB for persistence across refreshes.

No cookies are used, no analytics track your files, and no third-party services have access to your documents. Click Clear All to remove all stored data from IndexedDB immediately.