Markdown TOC Generator
0 headings found
No headings to list yet. Paste Markdown with ATX headings (# … ######).
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
Agent Invocation
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.
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.
Frequently Asked Questions
What does the Markdown TOC Generator do?
It scans your Markdown for ATX headings (# through ######) and builds a nested table of contents where each entry links to that heading's anchor.
How are the anchor links generated?
Headings are slugified the GitHub way: lowercased, punctuation stripped, spaces turned into hyphens, and duplicate slugs get a -1, -2 suffix.
Does it support GitHub and GitLab anchors?
Yes. Switch the anchor style between GitHub and GitLab; the GitLab style additionally collapses repeated hyphens and trims them from the ends.
Why are some headings left out of the table of contents?
Headings inside fenced code blocks (``` or ~~~) are ignored, and only headings within your chosen minimum and maximum level range are included.
Is my document uploaded anywhere?
No. Parsing and slug generation run entirely in your browser, so the Markdown you paste never leaves your device.