How to Combine Multiple Markdown Files Into One
Select several .md files, put them in the order you want, and join them with a horizontal rule or a filename heading between each one. Everything runs in the browser.
Direct answer
Open the Merge mode of the tool above, choose your .md files with the file picker or drag them onto the drop zone, reorder them with the up and down buttons, then pick a separator: a `---` horizontal rule, a heading made from each filename, or nothing. The tool joins the text and gives you a copy button plus a download of the combined file. Files are read in your browser with the File API and never uploaded.
Open Merge & Split Markdown toolWhen to use this
- A docs folder holds one file per topic and you need a single document to send or print.
- You want one file to paste into an AI chat instead of ten.
- Release notes are written per version and need to become one changelog.
Steps
- Open the tool and stay on the Merge tab.
- Click the file picker and select every .md file, or drag them onto the drop zone.
- Use the up and down buttons to set the reading order.
- Choose a separator. A filename heading keeps the source of each section obvious.
- Press Copy, or press Download to save the combined Markdown file.
Example conversion
intro.md: MarkdownMe converts text between formats. setup.md: Install the CLI, then run the init command.
## intro MarkdownMe converts text between formats. --- ## setup Install the CLI, then run the init command.
Common mistakes
- Check the order before you copy. The file picker returns files in the browser's order, which is not always the order you clicked.
- Duplicate H1 headings across files make one long document with several title-level headings. Demote them, or use the filename-heading separator to give each section a consistent level.
- Relative image and link paths break when the merged file is saved somewhere else. Fix those paths after merging.
FAQ
- Are my files uploaded anywhere?
- No. The tool reads each file with the browser File API and builds the download with URL.createObjectURL. No file content leaves your machine.
- Can I merge files other than .md?
- Any plain-text file can be read, including .txt and .mdx. Binary files such as .docx or .pdf are not supported.
- Can I get a .zip of the results?
- No. The tool has no zip support. Merge produces one combined file, and Split gives you a download button per part.
Related merge and split guides
How to Split a Long Markdown Document by Heading
Paste one large Markdown document, choose H1 or H2 as the break point, and get one part per section with its own copy and download button.
Chunk a Markdown File for AI Context Windows
Split a long document into size-limited parts so each chunk fits a model context window or a RAG index entry. Size is set in characters, with an approximate token count shown.
Merge a Docs Folder Into a Single Markdown File
Select every file in a docs folder, order them, and join them into one document with filename headings so each source stays identifiable.
Split a Book Manuscript Into Chapter Files
A manuscript that uses one H1 per chapter can be split into one file per chapter, each downloadable on its own.