toolgarden.xyz
中文

Markdown Merge

Free online tool to merge multiple Markdown files into one MD file

File merge

Merge multiple Markdown files into one MD file in order.
File list0 files

Uploaded files will appear here.

Merged result

You are in Markdown mode. Upload files and click merge.

About this tool

Markdown merge concatenates `.md` documents while preserving source syntax. Headings, reference links, footnotes, and fenced code depend on whole-document context, so duplicate definitions or an unclosed fence can affect later files.

The tool does not rewrite relative image paths, heading levels, or table-of-contents anchors. For repository documentation, fix resource links relative to the final file location and preview in the actual Markdown renderer.

How to use it

  1. Check every file boundary

    Confirm code fences, HTML tags, and lists are closed.

  2. Arrange and separate

    Place files in reading order with sufficient newlines between chapters.

  3. Preview final Markdown

    Check heading hierarchy, relative links, images, footnotes, and contents anchors.

Supported range and limits

Input / output
Several .md files in, one Markdown file out
How it joins
In list order with a blank line between files, so adjacent paragraphs are not parsed as one
Heading levels
Not renumbered. If every file starts at a level-1 heading, the merged document has several; usually you will want to demote them by hand
Relative links and images
Paths are kept verbatim, so relative paths usually break when the sources lived in different directories
Front matter
YAML front matter at the top of each file survives as body text and needs clearing out
Next step
Feed the result to Markdown to PDF or Markdown to HTML to produce a deliverable

When you would use it

  • Assembling project documentation

    Join installation, usage, and reference chapters into one README or manual source.

  • Compiling writing drafts

    Combine Markdown notes in chapter order for unified editing.

  • Reassembling a document written by chapter

    Merge chapter files into one manuscript, then convert to PDF or HTML in a single step.

What to know before you start

  • Relative links are not automatically changed for the new file path.
  • Duplicate reference definitions, footnote IDs, or HTML anchors can conflict.
  • Markdown dialects vary by platform, so validate in the target renderer.

Related concepts

fenced code block
A multiline code region enclosed by matching backticks or tildes.
relative link
A resource path resolved relative to the Markdown file location.

Frequently asked questions

Does Markdown Merge preserve Markdown syntax?
Yes. It appends the original Markdown content in order and adds a second-level heading for each source file.
Why are there several level-1 headings?
Because every source file starts at #. Nothing is renumbered, so demote the headings in the second file onward (# becomes ##, and so on) to get a sane document structure.
Why are the images broken?
Relative paths in Markdown resolve against the file's own directory. When the sources lived in different directories those paths break after merging. Use absolute paths, or gather the images into one directory first.