EN
PortuguêsEnglishEspañol
All tools
Developer tools 100% free

Table of contents generator for blog posts

Paste the post's HTML (from the WordPress editor in code mode, for example). The table of contents and the HTML with the ids come out instantly.

How to use

Thank you so much for helping!

Every donation helps pay for the servers and keeps the tools free for everyone. Pick or type an amount:

Secure payment by Stripe. Opens in a new tab.

Back to Ready-made site blocks

A clickable table of contents in seconds

Available in: PortuguêsEnglish

Advertisement

Table of contents generator for blog posts: what it is for

Paste the post's HTML, like the one from the WordPress code editor, and get a table of contents with links to each section. The tool reads the h2, h3 and, if you like, h4 headings, keeps existing ids and creates the missing ones from the heading text, without accents and with hyphens, never repeating.

You get two pieces of code: the table of contents, to paste after the introduction, and the post with the ids added to the headings. The table of contents can be a collapsible block or a fixed box, with or without 1, 1.1, 1.2 numbering, and comes with smooth scrolling that respects people who asked for less motion.

How to use

  1. Paste the post's HTML.
  2. Choose the levels, format and numbering.
  3. Copy the table of contents and the post with ids.

When to use it

  • Long blog posts.
  • Guides and tutorials.
  • FAQ pages.

Frequently asked questions

Does a table of contents help on Google?

It can. With anchors on headings, Google sometimes shows links to the sections right below the result, and people go straight to the part they want. And in a long post, the table of contents makes it clear right at the start that the text answers the question.

What if the heading already has an id?

The tool keeps the existing id and only creates the missing ones, from the heading text, without accents and with hyphens. If two headings produce the same id, the second gets -2 at the end.

Where should I put the table of contents?

After the introduction, before the first h2. Use the collapsible block (details) if the table of contents is long, so it doesn't push the text down on phones.

Is it really free?

Yes, 100% free. No sign-up, no subscription and no usage limits. All Tools123 tools are free and run right in your browser.

Similar tools

The tools are provided as is, without warranty. We are not responsible for the results or for how they are used.