Tool guide
About this tool.
- The Markdown TOC tool reads the headings of a Markdown document and writes a nested list of links to them. It runs locally in your browser or editor, so your document never leaves your machine.
- Both heading styles are understood: lines starting with hash marks, and text underlined with equals signs or dashes. Headings inside fenced code blocks and indented code are ignored.
- Anchors follow the GitHub rules: lowercase, punctuation removed, spaces turned into hyphens. Repeated headings get a numeric suffix such as intro-1, in document order.
- Links, images, emphasis and HTML tags inside a heading are reduced to their text before the anchor is made, so a linked heading still gets a clean anchor. YAML front matter at the top of the file is skipped.
Paste a Markdown document and pick the heading levels to include.
Choose a dash, asterisk or numbered list style.
The result is a nested list of links using GitHub style anchors.
Code blocks are skipped, and duplicate headings get numbered anchors.
The summary shows how many headings were listed.
- ## Intro, ### Setup → - [Intro](#intro) with a nested - [Setup](#setup)
- Two headings called Intro → #intro and #intro-1
- ## Closing ## → - [Closing](#closing)
- Numbered style → 1. [A](#a) with nested 1. [B](#b)
- Input is limited to 1,000,000 characters.
- The minimum level must not exceed the maximum level.
- Headings with no text are skipped.