Merge TXT files
Combine TXT files in your chosen order and save one UTF-8 text file.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Append each TXT file’s full text in the displayed order and download the UTF-8 result as merged.txt. Choose a default input encoding, with per-file choices for files that differ: UTF-8, GB18030/GBK or Big5. The default checks UTF-8 strictly; it does not detect encodings. Check every preview and confirm before merging, including UTF-8 or empty files.
How to use this tool
- Choose local .txt files, then use the up and down controls to set their order. Remove any file you do not want to include.
- Check the default encoding and each file’s encoding. Enter the text to place between files, then select “Read local preview”. Check every excerpt and confirm before merging.
- Select “Merge TXT files”, then “Download” to save the UTF-8 TXT. Open the file in the receiving app and check the boundaries between files, their order and the complete text. You can also select “Copy result” and paste the text into another app.
Supported inputs and limits
Up to 20 TXT files, 10 MiB each and 30 MiB in total. Filenames are limited to 512 characters; some characters, such as emoji, count as two. The separator and other settings have a combined 2 MiB limit in UTF-8. Each preview shows only the beginning, so inspect the complete merged result too.
Worked example
Example input
legacy-gb18030.txt legacy-big5.txt
Example options
{
"encoding0": "gb18030",
"encoding1": "big5",
"encodingConfirmed": true
}Example output
你好,世界。 第二行 繁體中文 第二行
When something does not work
Keep the original files. If decoding fails or the words look wrong, check the affected file’s source encoding and choose it from that file’s encoding list: UTF-8, GB18030/GBK or Big5. After adding, removing or reordering files, or changing any encoding, read all previews and confirm again. Each preview shows only the beginning, so compare the complete merged text with the originals. Merging cannot restore damaged text. If none of the listed encodings gives the expected text, obtain a correctly encoded source copy. For a limit error, use fewer or smaller files, shorter filenames or less text between files. Remove unwanted empty files if they leave extra separators.
Frequently asked questions
Are my files uploaded?
No. Files and tool input are processed in your browser. A temporary workspace may remain while you move around the site in the same tab, but it has time and memory limits. Refreshing or closing the tab clears it. Download results you want to keep.
What should I check in the merged TXT?
Check every boundary between files. The default separator is two LF line breaks, inserted between each pair of files. Enter a real line break to add one; typing a backslash followed by n does not create a line break. An empty separator joins the text directly; the last line of one file can run into the first line of the next. Empty files, including UTF-8 files containing only a BOM, contribute no text but keep their position and separators. A single empty file can produce an empty output. A leading input BOM is removed from each file; the tool does not add an output BOM automatically. Original CR, LF and CRLF line breaks remain. Filename headings are not added, and merging does not normalize Unicode or repair damaged text.
Documentation & further reading
Related tools
TXT to UTF-8
Read a TXT file with the right source encoding and save it as UTF-8.
Word counter
Words, characters, and paragraphs at a glance.
Case converter
Change pasted text to uppercase, lowercase or simple capitalized forms.
Remove duplicate lines
Less repetition. Same order.