BizTechLab

IDEASINNOVATIONIMPACT

Markdown

Table of Contents Generator

Generate a linked table of contents from a document's headings, with GitHub-compatible anchor links. Runs entirely in your browser; nothing you paste is ever sent anywhere.

Markdown
Paste Markdown on the left to generate a linked table of contents.

Quick Learn

Long Markdown documents — READMEs, integration guides, RFCs — get hard to navigate once they pass a handful of headings. A table of contents fixes that with a list of links that jump straight to each section, generated once and pasted in at the top of the file.

This tool reads every heading in your document (both # ATX style and the older underlined Setext style for H1/H2), skips anything inside fenced code blocks so a "# comment" in a shell snippet never gets mistaken for a heading, and builds anchor links the same way GitHub renders them — lowercased, punctuation stripped, spaces turned into hyphens, and duplicate headings automatically numbered (-1, -2, ...) so every link is unique. Everything runs locally in your browser.

Best Practices

  • Use the Min/Max level filters to keep the TOC readable — H1–H3 is a common default; including H4–H6 in a long doc usually produces a wall of links instead of a useful overview.
  • The generated anchors match GitHub's own heading-link algorithm, so this TOC works correctly when pasted into a README or wiki page rendered on GitHub.
  • If you're not publishing to GitHub, double-check anchor links against your actual renderer — some Markdown processors (Jekyll, GitBook, custom site generators) slugify headings slightly differently.
  • Duplicate heading text (two sections both called "Overview") is handled automatically — the second occurrence links to a "-1" suffixed anchor, matching how GitHub disambiguates them.

More Markdown Tools

See all Markdown tools

Frequently Asked Questions

No. The table of contents is generated entirely in your browser — nothing you paste, type, or drop as a file is sent to a server.

Want the engineering deep-dives behind tools like this one?