Markdown Table of Contents Generator
Automatically generate clickable, GitHub-compliant Markdown tables of contents from your document headings with customizable depth and list styles.
Generate Clickable GitHub Markdown Table of Contents Online
Quickly generate a clickable table of contents for your GitHub READMEs, open source documentation, and blogs. Automatically calculates URL-safe anchors compliant with GitHub, GitLab, and Bitbucket slug algorithms.
How to Use the Markdown TOC Generator
Paste Your Markdown Document
Input your README, documentation file, or blog article into the left panel.
Customize Depth & Style
Select your desired maximum depth (e.g. H2-H3) and preferred bullet or numbered layout.
Copy or Download
Copy just the TOC snippet to paste into an existing file, or download the full document.
Key Features & Capabilities
Pro Tips & Best Practices
- •Placing a clean TOC at the top of large README files dramatically improves readability and GitHub repository discovery.
Frequently Asked Questions
How do GitHub Markdown anchor links work?
GitHub turns each heading into a URL anchor by lowercasing the text, removing punctuation, and replacing spaces with hyphens (e.g. '## 1. Setup' becomes '#1-setup'). This generator follows that exact specification.
Does this ignore headings inside code blocks?
Yes! Comments like '# TODO' inside code snippets are recognized as code and excluded from the TOC.
Can I choose not to include the main H1 title?
Yes, the 'Include H1 Title' checkbox allows you to omit the top document title so your TOC focuses purely on sections.
Related Markdown Tools
Heading Numberer
Hierarchically auto-number heading sections (1., 1.1, 1.1.1) while preserving code blocks.
Slug Generator
Generate clean URL anchor slugs from heading titles with customizable hyphens or underscores.
Anchor Checker
Audit internal #anchor jumps against existing document headings to find broken in-page links.
Markdown Editor
Full-featured dual-pane live editor with syntax toolbar, localStorage autosave, and document stats.