# Merge files This article explains how to merge files of PDF, Microsoft Word, Excel and PowerPoint and other formats using GroupDocs.Merger for Java API. If you decide to write from scratch a program for merging multiple documents into a single file, it’s not going to be a cakewalk. Even for those file types that have open-sourced their specifications, it could be a tricky and time-consuming process. You will have to learn all the format's peculiar properties, write your code and then check how it works over a wide range of files with different content, layout, internal structure, formatting etc. When talking about proprietary formats the initial task becomes even more difficult - big companies don’t want you to know how everything works inside. Therefore, if you want to combine different files into one the possible solution is to reverse engineer needed formats. Happily it’s not the only way to solve the task because GroupDocs.Merger for Java library has already done the most difficult part of the work for you and provides a simple and convenient API to merge multiple files into one programmatically. All you have to do is to reference GroupDocs.Merger for Java inside your project and write a couple lines of java code. The list of supported file formats that you can merge together is quite wide and you can find it [here]({{< ref "merger/java/getting-started/supported-document-formats.md" >}}). {{< alert style="info" >}} **Try online** You can try to merge files online and download results for free using GroupDocs.Merger [Live Demo](https://products.groupdocs.app/merger) {{< /alert >}} Please check the articles listed below to learn more about how to merge PDF or Microsoft Word documents, Microsoft PowerPoint presentation or Excel spreadsheets and other file types. ## Contents - [Merge HTML](https://docs.groupdocs.com/merger/java/merge/html.md) - [Merge images](https://docs.groupdocs.com/merger/java/merge/images.md) - [Merge PDF](https://docs.groupdocs.com/merger/java/merge-pdf.md) - [Merge Word documents](https://docs.groupdocs.com/merger/java/merge/word.md) - [Merge PowerPoint Presentations](https://docs.groupdocs.com/merger/java/merge/powerpoint.md) - [Merge Excel spreadsheets](https://docs.groupdocs.com/merger/java/merge/excel.md) - [Merge text files](https://docs.groupdocs.com/merger/java/merge/txt.md) - [Merge archives](https://docs.groupdocs.com/merger/java/merge/archives.md) - [Merge TEX](https://docs.groupdocs.com/merger/java/merge/tex.md) - [Merge EPUB](https://docs.groupdocs.com/merger/java/merge/epub.md) - [Merge Open Document files](https://docs.groupdocs.com/merger/java/merge/open-document.md) - [Merge pages from various documents](https://docs.groupdocs.com/merger/java/merge-pages-from-various-documents.md) - [Merge documents to DOC](https://docs.groupdocs.com/merger/java/merge-documents-to-doc.md) - [Merge documents to PDF](https://docs.groupdocs.com/merger/java/merge-documents-to-pdf.md) - [Merge pages in the arbitrary order](https://docs.groupdocs.com/merger/java/merge-pages-in-arbitrary-order.md)