Markdown TOC generator
Parse Markdown headings into an anchored table of contents, skipping fenced code and handling duplicates.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Markdown text
Table of contents
Headings become clickable anchors.
Enter Markdown to generate a table of contents
Headings: 0 · Levels: 0
What this tool does
- Generate a TOC from README or documentation.
- Create unique anchors for duplicate headings.
- Limit the heading depth included in the TOC.
Example
Input
# Guide ## Install ## Usage
Output
- [Guide](#guide) - [Install](#install) - [Usage](#usage)
Only ATX headings are parsed; hashes inside fenced code are ignored.
Frequently asked questions
Are fenced code blocks supported?
Yes, headings inside fences are ignored.
Can duplicate anchors collide?
No, later duplicates receive a numeric suffix.
What heading levels are included by default?
Levels 1 through 6.
Keywords:Markdown目录Markdown TOCheading parsertable of contentstext tool