Free Table of Contents Generator
Create a linked table of contents from your HTML or Markdown headings, with automatic heading IDs, nested lists and copy-ready HTML and Markdown.
Loading tool…
Free to use, no sign-up. Your text is processed in your browser and is not sent to our server.
Quick answer: A table of contents (TOC) generator builds a list of links to the sections of a long page. This tool reads your H2–H4 headings, creates unique anchor IDs, builds a nested bulleted or numbered list, and — for HTML input — returns your content with the IDs added so the jump links work immediately.
What the Table of Contents Generator does
A table of contents helps readers scan long articles and jump to the section they need. Search engines may also show links to page sections when content is well structured, although that is not guaranteed.
This tool supports both formats:
- HTML: detects <h2>–<h4> elements, keeps existing IDs and adds new unique ones.
- Markdown: detects ## to #### headings and generates a Markdown TOC with matching slugs.
Choose which heading levels to include and whether the list is bulleted or numbered.
How to use it
- Paste your article HTML or Markdown.
- Choose the heading levels and list style.
- Click Generate table of contents.
- Copy the TOC HTML and place it after your introduction.
- For HTML input, replace your content with the version that includes heading IDs.
Example
Input: “## Why content marketing works … ## How to start … ## Measure results”.
Output: <li><a href="#why-content-marketing-works">Why content marketing works</a> and two more items.
How to interpret the results
The preview shows how the TOC will look. If a heading appears twice, the second gets a numbered suffix (for example #faqs-2) so every link is unique.
Best practices
- Add a TOC to articles longer than about 1,500 words.
- Keep headings short and descriptive.
- Place the TOC after a short introduction.
- Use “Table of contents” as an accessible label.
Common mistakes to avoid
- Including every H4 in short articles.
- Changing heading IDs after publishing (breaks shared links).
- Using a TOC plugin and manual TOC on the same page.
Limitations and accuracy
Markdown IDs depend on your platform’s slug rules, which can differ. In the WordPress block editor, you can also set heading anchors in each Heading block’s Advanced settings.
Frequently asked questions
Does a table of contents help SEO?
It improves navigation and can help Google understand page sections. It may enable section links in results but this is not guaranteed.
Where should I put the TOC?
After the introduction and before the first main section.
Does it work with WordPress?
Yes. Paste the HTML into a Custom HTML block or add IDs as heading anchors.
Is it free?
Yes.
Related tools
- Free AI Blog Outline Generator
- Free Word Counter
- Free Content SEO Score Checker
- Free AI Article Writer
- All 26 AI writing & content SEO tools
Next step
Want long-form content that is easy to navigate and built to rank? Talk to our team.
Get expert SEO help