Markdown Table of Contents Generator
Paste Markdown, choose the heading depth, and copy a nested table of contents with GitHub-style anchor slugs.
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Requirements](#requirements)
- [Downloading](#downloading)
- [Configuration](#configuration)
- [Advanced Usage](#advanced-usage)
- [Performance Tuning](#performance-tuning)
- [Troubleshooting](#troubleshooting)Slugs follow GitHub’s algorithm, so anchor links work inside READMEs, GitHub issues, and most static site generators. Headings inside fenced code blocks are ignored.
Generate linked navigation from Markdown headings
The Markdown TOC Generator scans ATX headings written with # characters and produces a nested list of anchor links for a README, guide, or documentation page.
You control which heading levels appear. The default includes H1 through H3; narrower ranges can produce a more focused outline. Fenced and indented code blocks are skipped so example headings do not enter the TOC.
As with every mdkit tool, everything runs in your browser. Paste proprietary docs without worrying about upload — your content stays on your device.
Markdown TOC example
Heading depth becomes list indentation, and heading text becomes an anchor slug.
# Guide
## Install
### Requirements- [Guide](#guide)
- [Install](#install)
- [Requirements](#requirements)How to use the Markdown Table of Contents Generator
- 1
Paste your Markdown
Paste the full Markdown document — or just the heading structure — into the input field.
- 2
Set the heading depth
Choose the minimum and maximum heading levels to include. The default is H1–H3.
- 3
Copy the TOC
The generated Markdown TOC appears on the right. Click copy and paste it at the top of your document, usually right after the title and summary.
Limits to know before you publish
- The current parser recognizes # ATX headings, not Setext headings written with === or --- underlines.
- Anchor-slug rules differ among GitHub, GitLab, static-site generators, and custom renderers; verify links on the destination platform.
- The generated block must be replaced manually when document headings change.
Common use cases
- Adding a navigation outline to the top of a long README
- Generating an anchor-linked outline for docs site pages before committing
- Building a TOC for a technical blog post that readers will skim
- Producing a summary of a research document's structure for a collaborator
- Quickly auditing the heading hierarchy of a doc — spotting skipped or duplicated headings
Frequently Asked Questions
Does this use GitHub-compatible anchor slugs?+
Can I include all heading levels (H1–H6)?+
Will it pick up headings inside code blocks?+
Does it handle duplicate heading text?+
Can I regenerate the TOC when I update the document?+
Related tools
Markdown → HTML
Convert Markdown or MD text to semantic HTML source with support for common GitHub Flavored Markdown syntax.
Table Generator
Build GitHub Flavored Markdown tables with a live grid editor. Set column alignment, add or remove rows and columns, and copy clean Markdown — no memorizing pipe syntax.
Learn more
How to Write a GitHub README: Examples + Template
Write a useful GitHub README with a clear overview, verified install steps, usage examples, badges, contribution guidance, and a copyable template.
Markdown Cheat Sheet: Syntax, Examples & GFM Reference
Copy Markdown syntax for headings, lists, links, images, code, tables, and task lists, with clear CommonMark and GitHub Flavored Markdown labels.
Technical Writing in Markdown: Structure & Workflow
Structure tutorials, how-to guides, reference, and explanation in Markdown, with practical style, review, examples, linking, and maintenance workflows.