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
Check every file boundary
Confirm code fences, HTML tags, and lists are closed.
Arrange and separate
Place files in reading order with sufficient newlines between chapters.
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.