Skip to content

Merge & Split Markdown

Combine multiple Markdown files or split one document by heading

Merge as many .md files as you like with a choice of separators — horizontal rule, blank line, HTML comment, or Pandoc page break. Or split a long document at H2 / H3 and download each chunk as its own file. Everything runs in your browser.

Merging 2 document(s) with the chosen separator. The separator appears between non-empty documents only.

How to merge or split Markdown documents

Merge

  1. Each panel is one source document. Rename the label and paste the contents, or click the file icon to open a .md from disk.
  2. Click Add document for more, or the trash icon to drop one.
  3. Choose a separator — horizontal rule (---), blank line, HTML comment, or Pandoc page break.
  4. Copy merged or Download .md when the preview at the bottom looks right.

Split

  1. Paste or open the source document on the Split tab.
  2. Pick the heading level to split at — ## for major chapters, ### for fine-grained sections.
  3. Click Split now. Each chunk appears as its own card with Copy and Download buttons. Filenames are derived from the chunk's first heading for sane downloads.

When to merge

  • Building a single-page site from a per-chapter docs folder. Merging into one Markdown source is often simpler than configuring a multi-file static-site generator.
  • Preparing a Pandoc → PDF / DOCX export that needs to flow as one document. Use the \pagebreak separator so each source file starts on a new page.
  • Generating a release announcement that combines blog excerpts, changelog summaries, and contributor shout-outs.
  • LLM ingestion: feeding a single concatenated file is often easier than juggling many uploads when working with AI tools.

When to split

  • A README that grew too long. Split into logical sections and move them to dedicated docs pages.
  • Migrating from a wiki to a static site where each H2 needs to become its own .md file in the file system.
  • Reviewing a large doc. Split, share one chunk with each reviewer in parallel, merge their edits back when done.
  • AI workflows where each chunk fits a context window better than the whole document.

Separator cheat sheet

SeparatorWhere it shines
--- (HR)Generic visible divider — GitHub, blogs, static sites.
Blank lineSeamless merging where you don't want a visible divider.
HTML commentProgrammatic markers consumed by build scripts.
Pandoc \pagebreakOne source file per PDF page in Pandoc pipelines.

Workflow examples

Combining release notes from microservices:

  1. Drop each service's RELEASE.md into a document panel.
  2. Use --- as the separator so each service has a clear visual section.
  3. Download merged.md, edit headings to mention the service name, push as the unified release post.

Breaking a giant tutorial into chapters:

  1. Open your monolithic tutorial.md on the Split tab.
  2. Pick H2 if the chapters are ## Chapter 1, H3 if they're sub-sections.
  3. Download each chunk — the filename matches the heading, so installation.md, usage.md, api.md drop into your docs folder ready to commit.

Companion tools

Privacy & data

Both tabs run entirely inside your browser. File reads, merges, splits, and downloads stay local. We don't upload, log, or store the content.

Frequently asked questions

How do I merge multiple Markdown files into one?
Add as many documents as you need with the 'Add document' button, paste or open each file, choose a separator (horizontal rule, blank line, HTML comment, or Pandoc page break), and copy or download the merged result. Empty documents are skipped automatically so you don't get stray separators.
How do I split a long Markdown document by heading?
Open the Split tab, paste your document (or open a .md file), choose whether to split at H2 (`##`) or H3 (`###`), and press Split now. Each chunk is shown with a Copy and Download button. The filename for download is derived from the chunk's first heading.
What separator should I use when merging?
A horizontal rule (`---`) is the most visible and the safest default — it renders as a clear divider on GitHub and in static-site generators. Choose a blank line if you don't want a visible divider, an HTML comment if you need a non-rendered marker for downstream tooling, or Pandoc's `\pagebreak` if you're feeding the result into a Pandoc → PDF pipeline.
Will splitting preserve fenced code blocks?
Yes. The splitter recognizes triple-backtick fences and won't break a code block in half even if it contains heading-like text. Each output chunk is self-contained Markdown that renders independently.
Is there a limit on file size or document count?
No hard cap. Both merge and split run in linear time and execute entirely in your browser, so very large documents (thousands of lines, dozens of merged files) still work — limited only by your browser's memory.
Is the content uploaded?
No. Everything — file reads, merging, splitting, downloads — happens inside your browser tab. Documents never leave your machine.