Table of Contents Generator: Free & Instant

Table of Contents Generator

Generate a clickable Table of Contents from your headings to improve dwell time and UX.

A table of contents generator turns the headings in your article into a clickable list of links. Paste HTML, Markdown-style or plain text, choose HTML, Markdown or numbered plain text output, and copy the finished TOC. It is built for bloggers, writers and developers who want readers to reach the section they need fast.

What Is a Table of Contents on a Web Page?

A table of contents on a web page is a list of links that jumps readers to the sections of an article. Each link points to an anchor, which is an ID attribute on a heading. A link such as #what-is-a-sitemap scrolls the browser to the heading whose ID is what-is-a-sitemap.

The list is built from heading levels. H1 is normally the page title, H2 marks main sections, and H3 to H6 mark nested subsections. A good TOC keeps that hierarchy, so an H3 appears indented beneath the H2 it belongs to.

Search engines read headings to understand how a page is organized. Google's Search Central documentation explains that results can include links that jump to a specific section of a page, and clear headings with anchors make that easier. Nothing is guaranteed, but a TOC also helps real readers scan a long post in seconds.

How Do You Use the Table of Contents Generator?

You use the generator by supplying your headings, choosing a format and clicking one button. The steps below match the labels on the page.

  1. Pick an input tab. Choose Paste HTML/Text if your article already exists, or Add Headings Manually if you are building a list from scratch.
  2. In paste mode, drop your article into the box labeled Paste HTML or Plain Text with Headings. It accepts HTML heading tags (H1 to H6) or plain lines that start with # characters. In manual mode, click Add Heading, pick H2, H3 or H4 for each row and type the heading text.
  3. Open Output Format and choose HTML (clickable links), Markdown or Plain Text (numbered).
  4. Set Min Heading Level (H1, H2 or H3) and Max Heading Level (H2 to H6). The defaults are H2 and H3, which suit most blog posts.
  5. Click Generate TOC. The TOC Preview shows the list, and the Generated Code box shows the markup or text.
  6. Click Copy Code and paste it into your page, editor or document. Use Clear to reset both tabs and start over.

Worked Example: From Headings to a Finished TOC

Say your article has four headings and you keep the default H2 to H3 range. The generator reads them in order, builds a nested list and creates an anchor name from each heading's text.

Heading in your articleLevelAnchor created
What Is a Sitemap?H2what-is-a-sitemap
Types of SitemapsH3types-of-sitemaps
How to Submit a SitemapH2how-to-submit-a-sitemap
Common ErrorsH2common-errors

With HTML selected, you get a nav element holding a bulleted list. "Types of Sitemaps" sits in a nested list under "What Is a Sitemap?", and each item looks like <a href="#what-is-a-sitemap">What Is a Sitemap?</a>. With Markdown selected, you get lines like - [What Is a Sitemap?](#what-is-a-sitemap), with the H3 line indented. With Plain Text selected, you get a simple list numbered 1 to 4.

Now imagine the same article also had an H4 under "Common Errors". At the default Max Heading Level of H3, it is skipped. Raise the max to H4 and generate again to include it.

How Do You Read and Use the Results?

You read the results in two places: the TOC Preview shows how the list will look, and the Generated Code shows what to copy.

Check the preview first

Confirm that the order and nesting match your article. Every H2 should sit at the top level, and each H3 should appear under the right parent. If a heading is missing, its level probably falls outside your min and max settings. A TOC that fits on one screen is easy to scan, so if yours runs very long, narrow the range to H2 only.

Make the links work with matching IDs

A link only jumps if the heading on your page has the same ID. If a heading already has an ID, the generator keeps it. If not, it creates one from the heading text: lowercase, with spaces and punctuation turned into hyphens. When two headings would produce the same anchor, the second gets a number such as common-errors-2. When any ID was created, a note under the preview reminds you to add that value as the heading's ID on your page.

Pick the right format for the destination

  • HTML goes into a CMS, a theme template or a static page.
  • Markdown suits README files, wikis and documentation written in Markdown.
  • Plain Text gives a numbered outline you can paste into an email, brief or document. It has no links, and the numbers run straight through all headings rather than following the hierarchy.

Who Needs a Table of Contents Generator?

Anyone publishing long, sectioned content benefits from a quick, accurate TOC. These are the most common situations:

  • Bloggers adding a jump menu to a guide of 2,000 words or more.
  • Developers and technical writers who need a TOC block for documentation pages or README files.
  • Editors who want a fast check that headings follow a logical H2 and H3 order.
  • Content planners who sketch headings in manual mode before drafting, perhaps after using a blog post outline generator.
  • Writers who need a numbered plain text outline for a client brief.

It sits well among other content writing tools for planning, polishing and publishing.

What Are the Best Practices and Common Mistakes?

The best practice is to finish your headings before generating the TOC, because any rename changes the anchor text. Regenerate after every edit so links never point to old names.

Fix the most common problems

  • "Please paste some content." appears when the box is empty. Paste your article and try again.
  • "No headings found." means the text has no heading tags or # lines inside your chosen range. Check your min and max levels first.
  • Markdown lines ignored. If your pasted content includes any HTML heading tags, the generator uses those and skips # lines. Stick to one style per paste.
  • Links do nothing. The heading on your page lacks the matching ID. Copy the anchor from the generated link and add it to the heading.
  • Skipped levels. Jumping from H2 straight to H4 creates an awkward, uneven list. Add the missing H3 level in your article.

Write headings that deserve to be listed

Descriptive headings make a TOC useful. "Step 3: Add the ID" tells readers more than "Next". Run important titles through a headline analyzer if you want stronger wording, and proofread them with a grammar checker because every heading becomes visible link text.

Keep the TOC near the top

Place the list after your introduction so readers see it before the first major section. Leave H1 out unless you truly need it, since it is usually the page title.

What Are the Limits of This Tool?

The generator builds a list from text you give it, and it does not edit your live page. You must add the matching IDs yourself, and it does not add styling or a collapse toggle. It also does not open PDF, Word or Google Docs files. For those, use the TOC feature built into the application, or paste headings as lines starting with # to get a list here. In manual mode, each row offers H2, H3 or H4 only.

A clear table of contents helps readers and gives search engines a cleaner view of your structure. Paste your headings into the generator above, choose your format and click Generate TOC to get code you can use right away. Then finish the article itself with a tight closing paragraph.

Frequently Asked Questions

What does a table of contents generator do?
A table of contents generator reads the headings in your content and builds a list of links to each section. It outputs HTML, Markdown or numbered plain text. For SEO, clear anchors can help search engines and readers see your page structure, though results are never guaranteed.
How do I generate a table of contents from my headings?
Paste your article into the input box, choose an Output Format, set the minimum and maximum heading levels, and click Generate TOC. Then click Copy Code. You can also use the Add Headings Manually tab to type each heading yourself.
Why do my table of contents links not jump to the section?
Links fail when the heading on your page has no matching ID. The generator keeps existing IDs and creates new ones from heading text. Copy each anchor name, such as common-errors, and add it as the ID on the matching heading.
Which heading levels should I include in my table of contents?
Most articles work best with H2 and H3, which are the tool's defaults. Include H4 to H6 only for deep documentation. Min Heading Level can start at H1, but H1 is usually your page title, so most people skip it.
Can I generate a table of contents for Word, Google Docs or a PDF?
The tool does not open Word, Google Docs or PDF files. Paste your text instead, with each heading on its own line starting with a # sign, or use manual mode. For automatic lists inside those apps, use their built-in TOC feature.
Is the table of contents generator free to use?
Yes, the table of contents generator is free and needs no sign-in. Paste your headings, generate the list and copy the code in HTML, Markdown or numbered plain text. You can use the Clear button to reset and run it again on another article.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now