jellykit logojellykit

Markdown TOC Generator

Build a nested Markdown table of contents with GitHub-compatible anchor links from H1–H6 headings.

Loading Markdown TOC Generator in your browser — 100% client-side with zero uploads.

Related text tools

All Text tools

Markdown Editor

Write Markdown with a live sanitized HTML preview and export to Markdown or clean HTML.

Text

Markdown to HTML Converter

Convert GitHub Flavored Markdown into sanitized HTML snippets or complete styled HTML documents locally.

Text

Markdown Link & Image Extractor

Extract inline links, reference links, autolinks, and images from Markdown documents with CSV export.

Text

Markdown Formatter

Beautify Markdown by normalizing heading spacing, list bullets, ordered numbering, blank lines, and GFM tables.

Text

Markdown Diff Checker

Compare two Markdown drafts line by line in a Web Worker or inspect side-by-side sanitized rendered previews.

Text

Markdown to PDF Converter

Turn Markdown documents with headings, lists, blockquotes, code blocks, and tables into clean multi-page PDFs.

Text

About Markdown TOC Generator

Generate an indented Markdown Table of Contents with GitHub-compatible anchor links from any README or technical document while ignoring fenced code blocks.

How to use Markdown TOC Generator

  1. 1

    Paste your Markdown document containing # through ###### headings.

  2. 2

    Set minimum and maximum heading depth (for example H2 to H4), list bullet style, and anchor link formatting.

  3. 3

    Copy just the generated Table of Contents or download the complete .md file with the TOC inserted at the top.

Frequently asked questions

Does it ignore # comments inside fenced code blocks?

Yes. Lines inside triple-backtick code fences are skipped so Python or shell comments are never mistaken for headings.

How are duplicate heading names handled in anchor links?

Following GitHub’s anchor convention, repeated headings automatically receive incremental suffixes such as #examples, #examples-1, and #examples-2.

Can I generate a plain outline without anchor links?

Yes. Uncheck GitHub anchor links to output a clean nested list of heading titles only.