Markdown TOC Generator
Paste your markdown and get a nested table of contents with GitHub-style anchor links. Headings inside code blocks are skipped and duplicate anchors get -1, -2 suffixes, exactly like GitHub renders them.
Generated TOC
How anchors work: GitHub builds each heading's anchor by lowercasing the text, stripping punctuation, and replacing spaces with hyphens; identical headings get -1, -2 suffixes in document order. This tool follows the same rules, strips inline markdown (bold, code, links) from heading text first, and ignores anything inside fenced code blocks so a bash comment never becomes a phantom chapter. Paste the generated block into your README, or use the "full document" toggle to get the whole file back with the TOC already inserted after the title.