Skip to main content

Text

File Merger

Combine text files or merge code versions with syntax colors and conflict resolution.

No registration
  • On your device

Browse more in Text or all tools.

Private on your device

Your information stays on your device and is not uploaded.

Merge two, three, or more text files into one downloadable file. Reorder files, choose separators, preview syntax-highlighted Java, Apex, and other source code, and download UTF-8 output. Two-way comparison lets you choose changes; three-way merging uses an explicit common ancestor and asks you to resolve conflicts. Processing stays in your browser.

How to use this tool

Add two or more files, choose Combine files or Merge versions, and arrange the sources. Set separators for combination, or assign Left, Right, and optional Base for version merging. Generate the result, resolve every conflict, review or edit the output, then copy or download your file.

Worked example

Add first.txt containing Hello and second.txt containing World. Choose One newline and Generate merged file. The preview contains Hello on line one and World on line two. Download merged.txt to save the reviewed result.

How it works

Combine two, three, or more text files in a chosen order, or compare two versions of the same code file. For three-way merging, assign your version to Left, the other version to Right, and their common ancestor to Base. All processing runs locally in a browser worker. Java, Salesforce Apex (.cls and .trigger), and other source files receive syntax highlighting. Conflicting changes require an explicit choice before the final file can be downloaded.

Limitations

Combine up to 20 files, 5 MiB each and 20 MiB total. Version comparison supports 2 files, or 3 with a common ancestor, up to 2 MiB and 20,000 lines each. Large previews are truncated and labeled. Syntax highlighting does not compile or validate code. PDF, Office, archive, and binary files require dedicated tools.

Privacy and file handling

Your data stays on your device and is not uploaded.

FAQ

Frequently asked questions

Can I merge three text files into one?

Yes. Add three files in Combine files mode, arrange their order, choose a separator, and generate the result. Review it before downloading.

Does this recognize Java and Salesforce Apex .cls files?

Yes. Java, Apex .cls and .trigger files have language-aware syntax colors in source and result editors. You can override a file's detected language, including ambiguous .cls files.

What is a three-way merge?

A three-way merge compares your version and another version against their common ancestor. Assign Left, Right, and Base explicitly. Overlapping changes need your choice before download.

Are my files uploaded?

No. File contents are processed in this browser tab. Refreshing or closing the tab discards the workspace; download your result first.

Will combining code produce a valid program?

Not necessarily. Combining files appends text and does not compile it. Multiple Java public classes, for example, may need separate files. Use Merge versions when reviewing changes to the same file.

Page last reviewed: