Markdown Table of Contents Generator

Paste a README, wiki page or Markdown article and get a ready-to-paste table of contents built from its headings, with links that jump to each section on GitHub, GitLab and most Markdown sites. Choose which heading levels to include, bullets or numbers, and whether to link. Code blocks and YAML front matter are skipped, and repeated headings get the -1, -2 anchors GitHub uses.

Tool
List
Markdown
Table of contents
Headings found
0
In the contents
0

Everything runs in your browser. What you type never leaves this device.

Features

  • GitHub-style anchors: lower case, punctuation removed, spaces to hyphens

  • Repeated headings get -1, -2 like GitHub

  • Choose heading levels, for example H2 to H3

  • Nested bullets or numbered lists

  • Reads # headings and underlined (=== / ---) headings

  • Skips headings inside code blocks and front matter

  • Runs in your browser: your text is never uploaded. Free, no signup

Where a TOC helps

Open-source READMEs

Long READMEs are easier to scan with a contents list at the top.

Docs and wikis

Add a contents list to a long guide in GitHub, GitLab or Bitbucket.

Blog posts written in Markdown

Static-site blogs (Hugo, Jekyll, Astro) can show a contents list made from the post's headings.

How anchors are made

The GitHub rule

  • The heading text is taken without Markdown: links, code and emphasis are reduced to their text.
  • It is lower-cased, characters other than letters, digits, spaces, hyphens and underscores are removed, and spaces become hyphens.
  • The second heading with the same text gets -1, the third -2, and so on.
  • Letters in Hindi and other scripts are kept, as GitHub does.

Other sites

GitLab, Bitbucket, VS Code preview and most static-site generators use the same or a very similar rule. If a link does not jump on your site, check how it builds heading IDs; some drop non-English letters or use a prefix.

Other Markdown tools

Markdown Table of Contents Generator - FAQ