Markdown Table of Contents Generator
Generate a nested Markdown table of contents with anchor links from your headings instantly — runs 100% in your browser with no upload.
Your table of contents will appear here…
🔒 Your Markdown is parsed in your browser — nothing is uploaded.
Turn your headings into a Markdown TOC
Paste your Markdown and this tool instantly builds a table of contents: a nested bullet list of anchor links, one line per heading. It reads ATX headings from # down to ######, indents each item by its level, and links every entry to a GitHub-style anchor. The output updates live as you type, so you can drop a ready-made Table of Contents straight into a README, a wiki page, a docs site, or any Markdown document and copy it with one click.
Accurate anchors, code blocks skipped
Anchor slugs are generated the same way GitHub renders them: the heading text is lowercased, punctuation is stripped, and spaces become single hyphens, so ## What is JSON? links to #what-is-json. Headings inside fenced code blocks (between ``` or ~~~ fences) are ignored, so a # comment in a shell snippet is never mistaken for a heading. Indentation is measured from the shallowest heading present, so a document whose top level is ## still starts flush at the left.
Frequently asked questions
Which heading levels are included?
All ATX headings from level 1 (#) through level 6 (######) are picked up. Each entry is indented by its depth relative to the shallowest heading in your document, producing a clean nested list.
How are the anchor links generated?
The heading text is lowercased, punctuation is removed, and each remaining space becomes its own hyphen — runs of spaces are not collapsed, so they produce multiple hyphens, matching how GitHub's slugger builds anchors. Letters and numbers, including non-English characters, are kept.
Is my Markdown uploaded anywhere?
No. The entire document is parsed locally in your browser with JavaScript. Nothing you paste is sent, stored, or uploaded to any server, so private notes and drafts stay on your device.