Content publishing guide
A table of contents is a promise about what the reader will find, kept
A table of contents does two jobs at once: it lets a reader jump straight to the section they came for, and it gives Google a labeled map of the page that sometimes surfaces as jump-to links directly in the search result. Building one by hand — typing each heading, guessing its anchor id, checking every link still resolves after an edit — is exactly the kind of bookkeeping worth automating.
Where the anchors come from
Each heading’s anchor is generated with the same slugifying logic as the URL Slug Generator — lowercase, spaces to hyphens, punctuation stripped. Two headings with identical text get numbered anchors (#overview, then #overview-1) so every link resolves to exactly one place, even in a document with a repeated section title.
HTML output vs. Markdown output
- HTML — a
<nav>with a nested<ul>, ready to paste into a CMS field that accepts raw HTML, or a static site template. - Markdown — a nested bullet list of link syntax, for a Markdown-native CMS, a README, or a GitHub-flavored doc. Most Markdown renderers (GitHub included) auto-generate the same kebab-case anchor ids from heading text, so these links resolve without any extra step on the destination’s side.
Getting the source headings right first
A table of contents is only as good as the heading structure it’s built from — a missing H1, a level that skips from H2 straight to H4, or the same heading repeated twice all show up as an oddly-shaped or confusing TOC. Worth checking the source content’s outline with the Heading Structure Checker first if the generated table of contents looks off.
Frequently asked
Does this update automatically if I edit the article later?
No — this generates a one-time snapshot from whatever content is pasted in. Re-run it after a substantial edit to the headings to keep the table of contents in sync.
What happens if my content has no H1, just H2s and H3s?
The generator uses whichever heading level appears first in the content as the shallowest level for indentation purposes — it doesn’t require an H1 specifically, so a document that starts at H2 still produces a correctly nested table of contents.
Does this tool send my content anywhere?
No — heading extraction and the table of contents itself are both generated entirely in your browser. Nothing is uploaded.
