Anchor behavior
The generator creates GitHub-style slug links from heading text and adds a numeric suffix when the same heading appears more than once. It intentionally does not rewrite your document.
Edge cases and hard limits
The generator reads your document line by line, keeping track of fenced code blocks so that headings inside a ``` or ~~~ block are ignored, and matches ATX headings from one to six hashes. Each heading's text is turned into a GitHub-style anchor: HTML tags are removed, the line is lowercased, characters that are neither letters nor numbers nor spaces nor hyphens are dropped using a Unicode-aware class, and runs of whitespace become single hyphens. Repeated headings are handled the same way GitHub does, with -1, -2 and so on appended, so links keep working in a README that has two “Installation” sections. The depth selector limits how many levels are listed, the result is shown as a link list you can copy, and your document itself is never modified.
Formats, sizes and other limits
Only ATX-style headings are recognised. Setext headings underlined with equals signs or hyphens, headings written as raw HTML, and anchors defined by explicit id attributes are all invisible to the scan, so a document authored in that style produces a short or empty table of contents. The slug algorithm matches GitHub's behaviour but not every Markdown renderer's, which means duplicates and punctuation-heavy headings can produce links that work on GitHub and not on another platform. Fence tracking is line-based, so a fence that is never closed suppresses the rest of the document, and an indented code block using four spaces rather than backticks is not detected. Output is a plain list for pasting; the tool will not insert it into your file.
Privacy: processed in your browser
Your Markdown stays in the textarea: the scan and the slug generation both run in the page, and the generated list is copied by your own clipboard. Nothing is saved, submitted or compared against an index, and the tool functions fully offline.
Frequently asked questions
Why are some of my headings missing from the list?
Most likely they are setext headings (underlined with === or ---) or plain HTML heading tags, neither of which the line-based scan recognises. Convert them to hash-prefixed headings, or add the missing entries by hand.
How are duplicate headings handled?
The same way GitHub does it: the first occurrence keeps the bare slug and each later one gets -1, -2 and so on appended. That keeps the anchors unique, but a renderer with a different slug rule may generate different links.
Does it insert the table of contents into my file?
No. The generator only produces the list, so you decide where it goes and how it is formatted. That also means running it repeatedly on the same document is harmless, since nothing in the source changes.