serps.io
All free tools

Content

Table of Contents Generator

Jump links from the headings you already wrote

In build

Paste your HTML or markdown and get a nested table of contents: an ordered list of headings with unique anchor ids, links that match them, the ids added back into your heading tags, and a flag on every level skipped in the outline.

Get early access

What it returns

  • A nested list of the headings found in the document, following the H2 to H4 structure instead of flattening everything to one level.
  • A unique anchor id for every heading, with duplicates disambiguated and punctuation stripped, plus the rewritten heading tags to paste back into the page.
  • The links themselves in HTML and in markdown, so the same outline works in a CMS field and in a readme.
  • A flag on every place the outline skips a level or repeats a heading, which is both an accessibility fault and a sign the structure drifted while the piece was written.

When this matters

A long guide ships with eleven H2s, no way to move between them, and a reader on a phone who has to thumb through six screens to reach the one section they came for. Adding the outline is a ten-minute job that got skipped eleven times. The second use is editorial: reading only the headings is the fastest way to notice that two sections cover the same ground and a third is in the wrong place, which is far easier to see as a list than as several thousand words of prose.

How to answer this today

The content area works the level above this: which queries a page should answer, what the pages already ranking cover, and therefore which sections the piece needs. That is where an outline should come from in the first place. Turning the headings in a finished draft into anchors and a navigable list is mechanical, which is why it belongs in a free tool.

Content

Why this is harder than it looks

Anchor ids have to be stable

An id generated from the heading text changes the moment the heading is edited, and every link anyone shared to that section breaks silently. New slugs can be generated freely, but ids that are already published have to be preserved.

Finding the real headings

A line styled with a div and a large font is not a heading, and plenty of templates put the site name in the H1 and the article title in an H2. Reading a document's structure means deciding what counts, which is not always what the markup claims.

Jump links are not extra search results

Google sometimes links straight to a section of a page, and when it does, it chooses that from the page content. A table of contents makes a page usable for people; it does not buy you sitelinks under your own result.

Depth is a judgement

Listing every H4 in a long reference produces an outline taller than the first screen, and listing only H2s hides the part the reader wanted. The right default depends on the document, so the level has to be a choice rather than a constant.