Markdown TOC Generator
Generate a nested Markdown table of contents from your headings with GitHub- or GitLab-style anchor links, skipping headings in code fences.
Markdown TOC Generator
Updated . Provided as is. Check the output before you rely on it in production.
How to use Markdown TOC Generator
- 1
Paste your Markdown
Drop your README or document into the input box, or load the sample to see the expected format.
- 2
Choose the heading range
Set the minimum and maximum heading levels so the table of contents covers only the depth you want.
- 3
Pick list and anchor style
Select a bulleted or ordered list, and choose GitHub or GitLab anchor slugs to match your platform.
- 4
Copy the result
Review the nested table of contents, then copy it and paste it near the top of your document.
Questions and answers
What does the Markdown TOC Generator do?
How are the anchor links generated?
Does it support GitHub and GitLab anchors?
Why are some headings left out of the table of contents?
Is my document uploaded anywhere?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/markdown-toc-generator/
For automation planning, fetch the canonical contract at /api/tool/markdown-toc-generator.json.