← back to flaviocopes.com

Markdown TOC generator

← All tools

Extract headings from markdown and build a linked TOC. Works like GitHub/GitLab README anchors. See also markdown table generator andmarkdown preview.

~~~

Generated TOC

Works on: GitHub, GitLab, most static site generators using GitHub slug rules.

May differ: Hugo, Docusaurus, and some CMSs use different anchor algorithms — test on your platform.

~~~

About this tool

Headings inside fenced code blocks are ignored. Anchors use GitHub slugification: lowercase, punctuation stripped, spaces to hyphens, duplicates get -1 -2 suffixes.

~~~

Read more