Paste a Markdown document and get a nested table of contents with links that work on GitHub, GitLab-style renderers and most static site generators.

Anchors follow GitHub’s rules: lowercase, punctuation removed, spaces turned into hyphens, and duplicate headings get -1, -2 suffixes in order. Inline formatting such as code, bold and links is stripped from the anchor text just like GitHub does when it renders the heading.

  • # headings and underlined (=== / ---) headings are both recognised.
  • Lines inside fenced code blocks are ignored, so a # comment in a shell snippet won’t show up. YAML or TOML front matter at the top is skipped too.
  • Start at defaults to H2, since most documents have a single H1 title; set it to H1 to include it. Max depth limits how deep the list goes.
  • Choose -, * or numbered lists, or turn off links to get a plain outline.