Markdown Table of Contents

Generate a nested linked list from Markdown headings with predictable GitHub-style anchors.

Loading Markdown Table of Contents...

How to use

Select the heading-depth range. Anchors are lowercase, punctuation is removed, spaces become hyphens, and duplicates gain -1, -2, and so on.

Example

Input
# Intro ## Setup ## Setup
Output
- [Intro](#intro) - [Setup](#setup) - [Setup](#setup-1)

Limitations

Anchor rules vary among Markdown renderers. This tool documents and uses a GitHub-style convention but cannot guarantee another host uses identical IDs.

Frequently Asked Questions

How are duplicate headings handled?

The first keeps its base anchor; later occurrences receive -1, -2, and so on.

Are headings inside code blocks included?

No. A maintained Markdown lexer distinguishes actual headings from code content.