Free Table of Contents Generator

Generate a table of contents from your content headings. Paste your article and get a formatted TOC with anchor links ready to copy into your blog post or documentation.

Paste your content with headings

Output Format

GENERATED TABLE OF CONTENTS

Paste content with headings above to generate a table of contents

Headings Found

0

H2 Sections

0

H3 Subsections

0

Output Format

HTML

How the Table of Contents Generator Works

A table of contents lets readers see what a long article covers and jump straight to the part they came for. Paste your article as HTML or Markdown and this generator pulls out its headings, keeps their hierarchy, and writes a list of anchor links you can copy as HTML or Markdown. It also previews the headings it found and counts your H2 sections and H3 subsections, which makes it a quick outline check too.

What it reads. HTML headings, h1 to h6, written with the opening and closing tag on the same line; any tags inside a heading, such as bold or links, are stripped from its text. If the input contains no HTML heading at all, it reads Markdown instead: lines that start with one to six # characters followed by a space. When both are present, only the HTML headings are used. Text pasted straight from Google Docs or Word arrives without heading markup, so download the document as HTML or Markdown first, or convert it with the HTML to Markdown converter.

How anchors are made. Each heading becomes a slug: lowercased, with everything except the letters a–z, digits, spaces and hyphens removed, spaces turned into hyphens, repeated hyphens merged, and hyphens trimmed from the ends. "What Is SEO? (2026 Guide)" becomes #what-is-seo-2026-guide. Two headings with the same text get the same anchor, and headings written in non-Latin scripts lose those letters, so rename duplicates or set those anchors by hand.

The step most people miss: the generator writes the links, not the targets. A link to #what-is-seo-2026-guide only jumps if the matching heading carries id="what-is-seo-2026-guide". In the WordPress block editor, select the heading and paste the slug into the HTML anchor field under Advanced. Many Markdown renderers and static site generators add heading IDs automatically, but each uses its own slug rules, so after pasting, click one link with symbols or accents in it to confirm it lands.

Worked example. Paste four Markdown lines: # Keyword Research Guide, ## What Is Keyword Research?, ### Search Intent and ## How to Find Keywords. The Markdown output is a four-item list: [Keyword Research Guide](#keyword-research-guide) at the margin, the two H2 links indented two spaces, and [Search Intent](#search-intent) indented four. The HTML output wraps the same links in a nav element with nested lists, and the counters show 4 headings, 2 H2 sections and 1 H3 subsection.

Common mistakes. The page title is usually the H1, and it is included in the output, so delete that line when the table sits under the title. Very deep tables are hard to scan; for most posts, keep H2 and H3 entries and drop the rest. In Markdown mode, a code sample whose lines begin with # (shell comments, for instance) is read as headings, so remove those lines from the input. And a table of contents can only be as clear as the headings it lists, so check the outline with the heading structure checker first.

What Google says. A 2009 post by Google's snippets team on named anchors advised breaking long, multi-topic pages into distinct sections, giving each an anchor with a descriptive name rather than "Section 2.1", and including a table of contents that links to those anchors, noting that section links appear in results only for queries where they are useful. Google's current snippet documentation describes "Read more" deep links to a section of a page and asks that the content be visible without opening tabs or expanders, that the page not use JavaScript to control scroll position on load, and that scripts not strip the # fragment from the URL. None of this guarantees section links. Google's SEO Starter Guide also says heading order doesn't matter to Google Search, though a logical order helps screen reader users.

Skribra writes every article with a logical heading hierarchy, so adding a table of contents is a paste away, and publishes it straight to your CMS.

SEO-Optimized Content

Create content that ranks with built-in SEO best practices. Skribra analyzes search intent, competitor content, and keyword opportunities to generate articles optimized for organic traffic from day one.

AI-Powered Generation

Get ideas, outlines, and full articles delivered straight to your CMS. With AI that understands context and your brand voice, you'll move from idea to published content faster than ever.

Human-First Quality

Every article reads naturally and provides real value to your audience. No robotic AI content—just well-researched, engaging articles that build trust and authority in your niche.

Automated Publishing

Connect Skribra to WordPress, Webflow, or your custom CMS. Articles are automatically published on your schedule, so you can focus on growing your business while your content works for you.

Ready to Scale Your Content?

Join thousands of businesses using Skribra to grow their organic traffic with AI-powered SEO content.

Try Skribra Free

Who Benefits From a Table of Contents Generator?

Content creators working with long-form content will find this tool valuable.

Bloggers

Add navigation to long blog posts to improve reader experience.

Technical Writers

Generate TOCs for documentation and user guides.

Content Marketers

Structure pillar content and comprehensive guides.

SEO Specialists

Improve page structure for better search visibility.

Course Creators

Outline lessons and modules for online courses.

Knowledge Base Managers

Create navigation for help articles and FAQs.

Academic Writers

Generate contents pages for papers and reports.

Documentation Teams

Build consistent navigation across docs sites.

Frequently Asked Questions

How do I generate a table of contents?

Paste your article's HTML or Markdown into the box, choose HTML or Markdown output, and press Copy. The generator lists every heading it found, keeps the H1–H6 hierarchy as nested list items, and links each one to an anchor made from the heading text. Then make sure each heading on your page carries the matching id.

What input formats does it accept?

HTML headings (h1 to h6, with the opening and closing tag on one line) and Markdown headings (lines starting with # to ###### and a space). If the input contains any HTML heading, Markdown headings are ignored. Plain text pasted from Google Docs or Word carries no heading markup, so export it as HTML or Markdown first.

How are the anchor links created?

Each heading's text is lowercased, stripped of everything except a–z, digits, spaces and hyphens, and joined with hyphens, so "How It Works" links to #how-it-works. Duplicate headings produce identical anchors, so give repeated headings distinct text or set their IDs by hand.

Why don't the links jump to my sections?

The generator writes links, not heading IDs. Each heading needs an id attribute that exactly matches its link, for example id="how-it-works". WordPress lets you set one in the heading block's HTML anchor field; Markdown renderers that create IDs automatically may slug symbols, accents or duplicates differently, so compare the two when a link misses.

Does a table of contents help SEO?

It can help Google link to sections, but nothing guarantees it. Google's own 2009 guidance on section links recommended distinct sections, descriptive anchors and a table of contents linking to them, and its snippet documentation describes "Read more" deep links that point to a section of a page. Mostly, a table of contents helps readers find what they came for in long content.

Where should I place the table of contents?

After the introduction and before the first main section, so readers get context first and navigation second. For very long guides, a sticky sidebar version also works. WordPress plugins such as Easy Table of Contents can automate placement if you would rather not paste one into every post.

Which headings should a table of contents include?

For most articles, the H2 sections and, if the piece is long, the H3s under them. Leave out the H1 page title, which sits right above the table anyway, and very deep levels that make the list hard to scan. The generator includes every level it finds, so delete the lines you don't need after copying.

Can I use it for Markdown files, README files and docs sites?

Yes. Choose Markdown output and paste the list at the top of the file. Most Markdown renderers add heading IDs automatically, so the links usually work as is; headings with punctuation, accents or repeated text are the ones to check, because renderers differ in how they slug those.