Merge Markdown Files

Quick answer

To merge Markdown files online, add up to 5 .md files below, drag them into order and click Merge and Download. The tool joins them, in order, into one .md file in your browser. Each file's content, including any front matter, is kept exactly as written.

  • Runs in your browser, nothing uploaded
  • No sign-up
  • Up to 5 .md files

Click here or Drop files to upload

How to use it

  1. 1 Save each chapter or section as its own .md file, numbered in reading order (01-intro.md, 02-setup.md…).
  2. 2 Add the files and check the order in the list; drag any file that is out of place.
  3. 3 Click Merge and Download to get merged-file.md, then convert it with Pandoc or import it into Google Docs.

What to expect

  • Files are joined with a line break between them; nothing inside a file is changed.
  • YAML front matter at the top of later files is kept as text. Remove it if you convert the result.
  • Relative image paths still point to the original locations, so keep the images next to the merged file.

Frequently asked questions

How do I turn the merged Markdown into a PDF?

Run pandoc merged-file.md -o merged.pdf (needs a LaTeX engine), or import the file into Google Docs with File > Open > Upload and choose File > Download > PDF.

Can I merge more than 5 Markdown files?

Not in one run here. Merge in batches, or concatenate on the command line, for example with pandoc or cat.

Will heading levels stay the same after merging?

Yes. Each file's # and ## headings are copied as written, so a file that starts with # becomes a new top-level section in the merged file.

How do I keep a table of contents after merging Markdown?

Convert the merged file with pandoc --toc, or import it into Google Docs and insert a table of contents there.