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
- Each panel is one source document. Rename the label and paste the contents, or click the file icon to open a
.mdfrom disk. - Click Add document for more, or the trash icon to drop one.
- Choose a separator — horizontal rule (
---), blank line, HTML comment, or Pandoc page break. - Copy merged or Download .md when the preview at the bottom looks right.
Split
- Paste or open the source document on the Split tab.
- Pick the heading level to split at —
##for major chapters,###for fine-grained sections. - 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
\pagebreakseparator 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
.mdfile 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
| Separator | Where it shines |
|---|---|
--- (HR) | Generic visible divider — GitHub, blogs, static sites. |
| Blank line | Seamless merging where you don't want a visible divider. |
| HTML comment | Programmatic markers consumed by build scripts. |
Pandoc \pagebreak | One source file per PDF page in Pandoc pipelines. |
Workflow examples
Combining release notes from microservices:
- Drop each service's
RELEASE.mdinto a document panel. - Use
---as the separator so each service has a clear visual section. - Download
merged.md, edit headings to mention the service name, push as the unified release post.
Breaking a giant tutorial into chapters:
- Open your monolithic
tutorial.mdon the Split tab. - Pick H2 if the chapters are
## Chapter 1, H3 if they're sub-sections. - Download each chunk — the filename matches the heading, so
installation.md,usage.md,api.mddrop into your docs folder ready to commit.
Companion tools
- Markdown Outline Reorder — restructure a single doc before splitting it.
- Markdown Diff — confirm the merged or split output matches expectations.
- Markdown Slug Collision — after merging, verify there are no duplicate anchor IDs.
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
- 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.
- 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.
- 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.
- 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.
- 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.
- No. Everything — file reads, merging, splitting, downloads — happens inside your browser tab. Documents never leave your machine.