Markdown Table of Contents Generator
Use Markdown Table of Contents Generator, review the result, and keep the original until the output is checked.
Keep your original file until you have checked the downloaded result. Browser memory and format support vary by device.
Headings inside fenced code blocks are ignored. The generated anchors follow GitHub-style slug rules.
How to use Markdown Table of Contents Generator
- Paste the document into the box, or press Open and pick a .md file.
- Tick Include the H1 heading if the title itself should appear in the contents.
- Press Generate Table of Contents and read the status line when the result is empty.
- Download table-of-contents.md and paste it into the top of your document.
What Markdown Table of Contents Generator actually does to your file
The list is built from ATX headings - one to six hash marks - so a title written with === or --- underneath is invisible here, and everything inside a fenced code block is skipped while code indented by four spaces is not, which can add phantom entries from a sample file. Links are written as GitHub-style anchors: the heading text is lower-cased, punctuation and emphasis markers are removed and spaces become hyphens, with duplicates numbered. That slug rule assumes Latin letters, so a heading in Chinese, accented or emoji collapses to a plain "section" anchor that points nowhere and needs fixing by hand. Indentation follows heading level, so the outline mirrors the document's structure rather than a flat list.
Markdown Table of Contents Generator FAQ
What does Markdown Table of Contents Generator do?
Generate a GitHub-style Markdown table of contents from headings in your document.
Which files work with Markdown Table of Contents Generator?
This category commonly supports Markdown, HTML, and PDF. Use the accepted file types shown in the uploader, because support varies by browser and by the engine behind each tool.
Is the generated output guaranteed to work?
It follows the relevant format rules, but practical failures such as a small scan target, an unreadable size, or a name your system already uses are yours to check before it goes into production.
Will my original file be changed?
No. You paste text or open a file to read it, the result appears in the other pane, and only what you copy or download leaves the page.
How is my file processed?
It is not uploaded. The processing is done locally by the renderer bundled with this page, so the practical ceiling is your device's memory and the limit shown beside the uploader - no queue, no account, no copy on a server.
Are headings inside code blocks included?
No. Fenced code blocks are ignored so example headings in code are not mistaken for document sections.