Free Markdown Table of Contents (TOC) Generator
Extract headers (# through ######) from README.md or documentation and generate clickable Markdown TOCs instantly.
About This Tool
The Markdown Table of Contents Generator parses Markdown headings and builds standard GitHub-Flavored Markdown (GFM) anchor lists. It automatically normalizes heading titles into lowercase hyphenated URL slugs for seamless documentation navigation.
How to Use
- 1Paste your Markdown documentation or README.md content.
- 2Select your preferred list style (Unordered '-' or Ordered '1.').
- 3Set your minimum and maximum heading depth (e.g. H2 to H4).
- 4Copy the generated Table of Contents markdown into your document.
Why Use ToolSnippet Markdown Table of Contents Generator?
Frequently Asked Questions
How are Markdown anchor slugs formatted?
GitHub anchors convert heading text to lowercase, remove punctuation, and replace spaces with hyphens (e.g., '# Getting Started' becomes '#getting-started').
Can I limit the TOC depth?
Yes, you can configure the extractor to only include H2 and H3 headings to keep the Table of Contents concise.
Related Tools
All Text & String Utilities →Ad Copy Character & Limit Validator
Validate character limits and guidelines for Google Ads, Meta/Facebook, LinkedIn, and X/Twitter Ads.
Advanced Case Converter
Convert between snake_case, camelCase, PascalCase, etc.
Anchor Text Diversity & SEO Optimizer
Classify anchor texts into Exact, Partial, Branded, Generic, and Naked URLs to audit link profile balance.