How do I auto-generate a table of contents for markdown?

There are several ways to auto-generate a table of contents (TOC) for markdown:

**Automatic Generation:** - **markshare** - TOC generated automatically from all headings - **GitHub** - No auto TOC, must add manually - **HackMD** - Use `[TOC]` tag

**Manual Tools:** - **markshare TOC Generator** - Paste markdown, get TOC code - **VS Code extensions** - Various plugins available

**With markshare:** You don't need to do anything. When you share markdown, the TOC appears automatically in a sidebar. It: - Shows all H1-H6 headings - Updates as you scroll - Links to each section

Try our free TOC Generator tool if you need the markdown code.

Try markshare Free

Share markdown as beautiful webpages in 3 seconds.

Get Started

Related Questions

Related Tools