Markdown TOC Generator

Generate a linked table of contents from your Markdown headings, with GitHub-style anchors. Configure levels and list style — everything runs in your browser.

All processing on this page runs locally in your browser unless noted otherwise.

Markdown input

TOC output

How to use

  • Paste or import a Markdown document with ATX headings (# – ######).
  • Choose which heading levels to include and the list style.
  • Copy the TOC, or insert it into the document (refreshable via toc markers).

FAQ

Do anchors match GitHub?

They follow GitHub’s common rules (lowercase, punctuation stripped, spaces to hyphens, duplicates get -1, -2, …). Edge cases with unusual Unicode may differ.

Why skip the first H1 by default?

Document titles are often H1 and look redundant inside a TOC. Turn the option off to include it.

Are headings inside code fences counted?

No — fenced code blocks are ignored when scanning for headings.

Related tools