Markdown TOC Generator
Paste your Markdown and instantly generate a linked table of contents. Supports GitHub-style anchors, nested indentation, and level ranges.
Your table of contents will appear here.
How to Use
Paste Markdown
Paste Markdown containing headings (# to ######) into the input field. "#" inside code blocks is automatically ignored.
Adjust Options
Choose the heading level range, bullet or ordered list, and whether to include anchor links.
Copy the TOC
Copy the generated table of contents with one click and paste it at the top of your README or document.
About the Markdown TOC Generator
A web tool that parses Markdown headings and automatically builds a table of contents (TOC). It generates GitHub/GitLab-style anchors (slugs), so the TOC works as in-page links the moment you paste it into your README.md. All processing happens in your browser and your text is never sent to any server.
Features
- GitHub-style AnchorsGenerates GitHub/GitLab-compatible slugs, handling non-ASCII headings and duplicates (-1, -2).
- Level Range & NestingPick which heading levels (H1-H6) to include and let the TOC indent automatically by depth.
- Code Block AwareIgnores "#" inside fenced code blocks (``` or ~~~) so comments are never mistaken for headings.
- Privacy FirstAll processing happens in your browser. Your text is never sent to any server.
Use Cases
- Add a table of contents to a GitHub / GitLab README.md
- Build a TOC for technical blogs and documentation
- Check the structure of Markdown articles
- Extract an outline (heading list) from long Markdown
- Generate navigation for wikis and internal docs
FAQ
Do the anchor links work on GitHub?
Are non-ASCII (e.g. Japanese) headings supported?
What happens with duplicate heading names?
Are "#" characters inside code blocks treated as headings?
Is my text sent to a server?
Can I change which heading levels are included?
Feedback
Missing a feature, or getting a result that looks wrong? Let us know — we improve our tools based on your feedback.