Skip to content
TabKiwiTabKiwi

Markdown TOC Generator

Build a linked table of contents from your Markdown headings, with GitHub-compatible anchors.

TextRuns in your browser. Your files never leave this device.
Loading tool…

About this tool

Paste a README or long document and get a nested table of contents you can paste at the top. Links use the same anchor format GitHub generates, including -1 and -2 suffixes for repeated headings, so they work when the file is viewed on GitHub. Choose which heading levels to include and whether to use bullets or numbers.

How to use Markdown TOC Generator

  1. Paste your Markdown document.
  2. Choose the heading levels and list style.
  3. Copy the table of contents and paste it into your document.

Frequently asked questions

Do the links work outside GitHub?

They work anywhere that generates heading ids the same way, including GitLab and many static site generators. The Markdown to HTML tool here also uses this format.

Are headings inside code blocks ignored?

Yes. Lines starting with # inside fenced code blocks are not real headings and are skipped.

More Text tools

View all 60 →