Markdown Table of Contents Generator

Generate a linked Markdown table of contents from document headings. Choose heading levels and list style, with GitHub-compatible anchors and local processing.

Project notes

Overview

Installation

Examples

Usage

Examples

Document processing stays in your browser. No account or file upload is required.

Heading links and Markdown compatibility

A table of contents is a nested list of links to document headings. GitHub-style anchors keep Unicode letters, remove punctuation, and add numeric suffixes to repeated headings. Code blocks are excluded. Filtering heading levels preserves the original anchors and document order.

Anchor rules differ between Markdown applications. This output targets GitHub-style automatic heading IDs; custom HTML IDs and another renderer's slug rules may differ. The preview links target the document below. Regenerate the contents after changing headings.

An example you can verify

Use heading levels 2–6. The H1 is excluded from the list but still reserves #setup, so the two H2 links become #setup-1 and #setup-2. The heading inside the code fence is excluded. These details matter when linking a real README.

Markdown source
# Setup

## Setup

### Examples

## Setup

```md
## Hidden
```
Markdown output
- [Setup](#setup-1)
  - [Examples](#examples)
- [Setup](#setup-2)

When the result differs

If a link misses its heading, compare the destination renderer’s heading IDs with the generated anchors. Custom IDs and a second copy of the same heading can change the target. Regenerate after renaming or moving headings, and choose levels that actually exist in the document.