SmartMarkdown

Markdown Table of Contents Generator

Generate a linked table of contents from your Markdown headings, with GitHub-compatible anchor slugs. Choose the heading-level range, pick a bullet or numbered style, and insert it straight into your document — all in your browser.

Paste Markdown with Headings

Output:
11 headings

Generated Table of Contents

- [Project Handbook](#project-handbook)
  - [Getting Started](#getting-started)
    - [Installation](#installation)
    - [Configuration](#configuration)
  - [Core Concepts](#core-concepts)
    - [Architecture](#architecture)
    - [Data Flow](#data-flow)
  - [API Reference](#api-reference)
    - [Authentication](#authentication)
    - [Endpoints](#endpoints)
  - [Troubleshooting](#troubleshooting)
Reviewers

Sarah Chen, SEO Content Strategist

Based on 4 sources
221 people find this tool helpful

What This Tool Does

Long Markdown documents are far easier to navigate with a table of contents at the top. This generator scans your headings and builds a nested, linked TOC automatically — no manual anchor-typing, no broken links when a heading is renamed. Regenerate it any time the document structure changes.

GitHub-Compatible Slugs

The anchors match GitHub's slugging rules exactly: lowercase, hyphenated, punctuation removed, with numeric suffixes for duplicate headings. That means the generated [Heading](#heading) links work when your README or docs render on GitHub, GitLab, and compatible platforms.

Levels, Style & Links

Restrict the TOC to a level range (say H2–H3) to keep it concise, choose between a bulleted or numbered outline, and toggle anchor links on or off. The nesting and indentation follow your heading hierarchy so the structure of the document is immediately clear.

Inserting Into the Document

Switch to Document + TOC mode and the tool places the table of contents after your first H1, or updates an existing TOC under a ## Table of Contents heading. Copy the result back into your file and you're done — the TOC is already positioned correctly.

Common Use Cases

  • READMEs: add a navigable TOC to a long project readme.
  • Documentation: generate outlines for guides and handbooks.
  • Wikis: keep a contents section in sync with headings.
  • Reports: produce a structured outline of a document.

Tips

  • Exclude the H1 title by setting the minimum level to H2.
  • Regenerate the TOC whenever you add or rename headings.
  • Use the Markdown Validator first to ensure your heading hierarchy is clean.

FAQ

Frequently Asked Questions