TOC Generator

Generate a Markdown table of contents (TOC) automatically from document headings. Scans all headings (h1–h6), creates anchor links and builds a nested list. Inserts the TOC after the first heading — perfect for README files and long documents.

All tools in one screen

Demo

What TOC Generator does

Heading scan

Finds all headings from # to ######, skipping headings inside code fence blocks.

Anchor links

Generates URL-compatible anchors: spaces → dashes, special characters removed.

Nesting

TOC indentation reflects heading levels: h2 → h3 → h4.

Placement

Inserts the table of contents after the first heading in the document.

Frequently Asked Questions

All tools in one Workspace

TOC Generator + Markdown Repair — well-structured, clean Markdown documents.