What input does the generator need?
Paste HTML that includes heading tags such as h1, h2, h3, and so on. Plain paragraphs without headings will not generate a TOC.
Quick Marketing Tools
Paste HTML with headings to generate a nested table of contents preview and copy-ready anchor-link HTML.
Generate a nested, clickable table of contents from HTML headings with anchor links for easier page navigation.
The Table of Contents Generator turns existing HTML headings into a structured navigation block for long pages. It parses H1-H6 tags, extracts the visible heading text, derives anchor IDs from that text, and builds nested unordered-list markup with links such as href=\
Paste the article or page HTML that contains heading tags. Review the preview tree first to see how H2, H3, and deeper sections nest under the page topic, then switch to HTML mode to copy the generated unordered list. The links point to IDs derived from heading text, so make sure your actual page headings have matching ID attributes or add matching anchors in your CMS before publishing. If two headings create the same generated ID, rename a heading or adjust the final anchor before using the TOC. Use the warnings to clean up obvious heading hierarchy issues before embedding the markup.
If your HTML contains an H1 for 'Complete Guide to On-Page SEO', H2 sections for 'Key Factors' and 'Content Optimization', and H3 subsections under each one, the tool builds a nested list of links such as '#complete-guide-to-on-page-seo' and '#content-optimization'. The preview shows the section tree, while HTML mode shows the copy-ready list. You can paste that list near the top of the published article, then add matching heading IDs in the CMS or page template. If two headings have the same text, review the generated IDs before publishing so the links do not point ambiguously to repeated anchors.
Browse more SEO Tools tools or open the related options below.
Paste HTML that includes heading tags such as h1, h2, h3, and so on. Plain paragraphs without headings will not generate a TOC.
They work when the live page has matching heading IDs. The tool creates href values from heading text, but your CMS must include corresponding anchors.
Yes. Preview mode shows the hierarchy, and HTML mode shows the copy-ready nested list.
It provides basic structure warnings for H1 count and skipped levels, but editorial quality still needs human review.