Markdown files

Choose or drop several .md files (or a folder).

No files yet. Drop several files here, choose them with the button or type text below.

No input yet.

Merged Markdown

Merge

Files never leave your browserHow?

Combine Markdown files into one document

This tool merges several Markdown files into one .md document in the order you choose. Drop the files, drag them into place, pick a separator and download the combined file – it all runs in your browser.

Last updated:

How it works

  1. Add the files

    Drop several .md files or a whole folder, pick them with the file button, or type Markdown to add a file by hand.

  2. Set the order and options

    Drag the files or use the arrow buttons, sort them by name, then choose the separator, file-name headings, heading shift and front matter handling.

  3. Download one file

    The merged Markdown updates as you change anything. Copy it, download merged.md or open it in the TOC generator.

Features

  • Order you control

    Drag and drop, arrow buttons for keyboard and touch, and natural sorting by name, so chapter-2.md comes before chapter-10.md.

  • Heading levels that fit together

    Use each file name as an H1 or H2 heading and shift the headings inside every file down a level, so the merged document keeps one clean outline.

  • Front matter handled

    YAML (---) and TOML (+++) front matter can be kept from the first file only, removed everywhere or kept for every file.

  • Separators for every target

    Blank line, horizontal rule, an HTML comment with the file name, or a page break for printing and PDF export.

  • Table of contents

    Optionally put a linked table of contents at the top with GitHub-style anchors. # lines inside code blocks are never treated as headings.

Limits & privacy

Up to 200 files per merge, each up to 10 MB and 50 MB in total. Files with a byte order mark or in UTF-16, Windows-1251 or Windows-1252 are detected and decoded before merging; you can force an encoding in the input options.

Merging is plain text work done by JavaScript on your device: the files are not uploaded and nothing is stored after you close the tab. See the privacy page.

FAQ

How do I combine multiple Markdown files into one?

Drop all .md files on the page, arrange them in the list and download merged.md. The files are joined in the list order with the separator you picked.

Can I add each file name as a heading?

Yes. Choose File name as heading: H1 or H2. "getting-started.md" becomes "Getting started"; a leading number such as "01-" is dropped from the heading.

Why should I shift heading levels?

If every file starts with its own H1 and you add file-name headings, the outline breaks. Shift +1 turns # into ## inside each file, so every file sits under its title.

What happens to YAML front matter?

By default the front matter of the first file is kept at the top and removed from the others, which is what static site generators expect from one page.

Can I merge Markdown into a PDF?

Merge with the page break separator, open the result in the Markdown Editor and use Print / PDF. Each file then starts on a new page.

Related tools