TOC Generator

Generate a table of contents from your Markdown headings.

Markdown Input
Generated TOC

How to Generate a Table of Contents

  1. 1
    Paste your Markdown

    Paste your Markdown document into the input panel. The tool scans for headings (# through ######).

  2. 2
    Configure options

    Set the maximum heading depth and choose between ordered (numbered) or unordered (bulleted) list output.

  3. 3
    Copy the TOC

    The generated table of contents appears in real time. Click Copy to grab it and paste it into your document.

Why Use Our TOC Generator

  • Scans all heading levels and generates properly nested anchor links
  • Configurable max depth — include only the heading levels you want
  • Toggle between ordered and unordered list output
  • Uses GitHub-style slug anchors (lowercase, hyphens) that work on most platforms
  • Browser-based — your document never leaves your device

Common Use Cases

Long-Form Documentation

Add navigation to lengthy README files, wikis, or technical documents so readers can jump to sections.

Blog Posts

Generate a quick table of contents for long articles to improve readability and user experience.

Knowledge Bases

Create structured navigation for internal knowledge base articles and onboarding docs.

Book Chapters

Generate chapter outlines from Markdown manuscripts for review or publishing workflows.

Related Tools

Need a different format? See every tool on the Markdown converter page, or go back to the MDConvert home page.

Frequently Asked Questions

Common questions about generating a table of contents.

How does the TOC generator work?
The tool scans your Markdown for heading lines (# through ######) and generates a nested list of links. Each link points to the heading's slug anchor, following the same convention used by GitHub and other Markdown renderers.
What is max depth?
Max depth controls how deep the table of contents goes. For example, a max depth of 3 includes h1, h2, and h3 headings but ignores h4 through h6. The default is 3, which works well for most documents.
Can I generate an ordered (numbered) TOC?
Yes. Toggle the Ordered List switch to generate a numbered table of contents using 1. markers instead of - bullet points.
Will the generated TOC links actually work?
The links use the same slug format as GitHub (lowercase, spaces to hyphens, special characters removed). They work out of the box on GitHub, GitLab, and most Markdown renderers that auto-generate heading anchors.
Is my document sent to a server?
No. The TOC is generated entirely in your browser using JavaScript. Your Markdown content never leaves your device.