Categories

Markdown Merger

Merge multiple markdown files with smart header level adjustment and table of contents generation

Click to upload files or drag and drop files here

Maximum file size: 20MB Maximum files: 10
Supported formats: text/markdown, .md, .markdown, text/plain

Key Facts

Category
Data Processing
Input Types
file, select
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Markdown Merger is a professional utility designed to combine multiple markdown files into a single, cohesive document while maintaining structural integrity through intelligent header adjustment and automated table of contents generation.

When to Use

  • Consolidating fragmented project documentation into a single master guide.
  • Merging individual chapter files into a unified technical manual or ebook.
  • Standardizing header hierarchies across multiple markdown files before publishing.

How It Works

  • Upload your markdown files and select your preferred merge strategy.
  • Choose a header handling option to automatically adjust or flatten nesting levels.
  • Enable the table of contents generation to create a navigable document structure.
  • Process the files to receive a single, unified markdown document ready for export.

Use Cases

Compiling technical API documentation from separate module files.
Merging collaborative writing drafts into a single manuscript.
Aggregating daily meeting notes into a monthly summary report.

Examples

1. Consolidating Technical Documentation

Technical Writer
Background
A technical writer has 5 separate markdown files representing different chapters of a software manual, each with its own H1 headers.
Problem
The files need to be combined into one document where the chapter titles become H2 headers under a single main H1 title.
How to Use
Upload the 5 files, select 'Smart' merge strategy, and set 'Header Handling' to 'Adjust'.
Example Config
mergeStrategy: smart, headerHandling: adjust, generateToc: yes
Outcome
A single markdown file with a generated table of contents and correctly nested header levels.

2. Merging Meeting Notes

Project Manager
Background
A project manager has several weekly meeting notes in markdown format that need to be archived into a single quarterly report.
Problem
The notes are scattered and lack a unified structure or index for quick reference.
How to Use
Upload all weekly files, select 'Simple Concatenate', and enable 'Add File Headers'.
Example Config
mergeStrategy: concatenate, addFileHeaders: yes, generateToc: no
Outcome
A chronological document where each meeting is clearly separated by its original filename as a header.

Try with Samples

markdown, text, file

Related Hubs

FAQ

Can I merge files with different header levels?

Yes, the 'Smart' merge strategy automatically adjusts header levels to ensure the final document maintains a logical hierarchy.

Does the tool support internal link preservation?

Yes, the tool includes an option to preserve internal links, adjusting them if necessary to ensure they remain functional in the merged file.

How many files can I merge at once?

You can upload up to 10 files simultaneously for a single merge operation.

Can I add a table of contents automatically?

Yes, simply toggle the 'Generate Table of Contents' option to 'Yes' to include a dynamic TOC at the top of your merged file.

What happens to the original file names?

You can choose to 'Add File Headers' to include the original filename as a section header, helping you track the source of each segment.

API Documentation

Request Endpoint

POST /en/api/tools/markdown-merger

Request Parameters

Parameter Name Type Required Description
mdFiles file (Upload required) Yes -
mergeStrategy select Yes -
headerHandling select Yes -
generateToc select Yes -
preserveLinks select Yes -
addFileHeaders select Yes -

File type parameters need to be uploaded first via POST /upload/markdown-merger to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-markdown-merger": {
      "name": "markdown-merger",
      "description": "Merge multiple markdown files with smart header level adjustment and table of contents generation",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=markdown-merger",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]