Markdown Portal Logo
MarkdownPortal
Open Editor
Generators

Markdown Table of Contents (TOC) Generator

Scan any Markdown document and build an accurate Table of Contents. Features depth selection (H1-H6), GitHub slug generation, bullet or numbered formatting, and one-click insertion.

Client-Side PrivateNo Limits • 100% Free
Your Markdown DocumentHeadings will be detected automatically
Generated Table of Contents
Found 0 matching heading(s)

Simple Workflow

How to Use the Markdown TOC Generator

Get instant, accurate results in three simple steps without uploading files to remote servers.

01

Paste Markdown Document

Input your README, article, or documentation with headings (#, ##, ###).

02

Configure TOC Options

Select heading range (e.g., H2 to H4), list style (bullet or numbered), and anchor slug format.

03

Copy or Prepend TOC

Copy the generated TOC or click "Prepend to Document" to insert it at the top of your file.

Key Highlights

Why Use Our Markdown TOC Generator?

Engineered for developers, technical writers, and content creators needing speed, reliability, and security.

GitHub Compatible Anchors

Generates GitHub-compliant link slugs (#heading-name) that work seamlessly in README files on GitHub.

Customizable Heading Depth

Filter which heading levels to include (e.g., include H2-H4 while excluding document title H1).

Bullet or Numbered Formats

Choose between unordered `- [Item](#url)` or ordered `1. [Item](#url)` hierarchical lists.

One-Click Prepend

Automatically places the generated TOC right after your document title with proper spacing.

Frequently Asked Questions

Common Questions About Markdown TOC Generator

Are the anchor links compatible with GitHub and GitLab?
Yes! The slug generator accurately strips punctuation, lowercases characters, and converts spaces to hyphens matching GitHub's algorithm.
What if multiple headings have the same name?
The generator automatically appends numerical suffixes (e.g., `#example-1`, `#example-2`) to keep anchors unique.
Can I exclude H1 from the generated TOC?
Yes, simply set the minimum heading level to H2 in the options panel.

More Tools

Related Markdown Tools

Explore All Tools →
Copied to clipboard!