Extract every heading from a Markdown document and build a linked table of contents, with anchors generated exactly the way GitHub generates them.
Waiting for Markdown
Anchors are generated the way GitHub generates them, so the links work where the document lives.
The outline appears here
Every heading with its level and its anchor, plus a table of contents ready to paste at the top of the document.
Markdown Outline runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
Pulls the headings out of a Markdown document and builds a table of contents you can paste straight back at the top of it.
The anchors are the part worth getting right. GitHub generates a heading's anchor by lower-casing it, stripping punctuation, and replacing each whitespace character with a hyphen — each character, not each run, so a heading with two spaces in it produces an anchor with two hyphens. Repeats get -1, -2 appended in document order. Those rules are small and easy to approximate wrongly, and an approximation produces an anchor that looks entirely plausible and links to nothing.
Headings inside a fenced code block are not headings. A # at the start of a line in a shell example is a comment, and a tool that lists it in the table of contents has misread the document. The same goes for an indented code block. Both forms are recognised and skipped.
Both heading syntaxes are read: the # form, and the setext form where a line of text is underlined with = or -. The outline reports which form each one used, which is useful if you are about to normalise them.
Two structural problems are reported alongside the outline. A level skip — an H2 followed by an H4 — reads as a missing section to anyone navigating by heading, which is how screen reader users move through a long document. And more than one H1 makes the document's title ambiguous. Neither is invalid Markdown; both are usually accidental.
On GitHub and anywhere using the same slug rules, yes — the anchors are generated by those rules, including the de-duplication suffixes. Other renderers sometimes differ; if yours does, the heading text is shown beside each anchor so you can see what was generated.
Because it is not a heading. Inside a fenced or indented code block a # is part of whatever language the block holds — usually a comment — and listing it would be a misreading of the document.
Yes. A line of text underlined with = is an H1 and one underlined with - is an H2. The outline shows which form each heading used.
Screen reader users navigate long documents by jumping between headings, and a jump from H2 to H4 reads as a section that is missing. It is valid Markdown and it makes the document harder to move through.
Exactly as GitHub handles them: the first keeps the plain anchor and each repeat gets -1, -2 and so on appended, in document order.
No, it reads one document at a time. For a multi-file site, the contents list usually belongs in whatever generates the site rather than in the Markdown.