Markdown Table of Contents Generator
Generates a table of contents linked to each heading using GitHub's anchor rules, with a choice of heading levels and numbering style.
Loading tool...
Runs in your browser. Nothing is sent anywhere.
When to use it
Use this for a long README, internal guide or multi-section Markdown blog post that needs a clickable table of contents so readers can jump to the part they need.
By default it takes level 2 and 3 headings and ignores # lines inside code blocks. Duplicate headings get a -1, -2 suffix the way GitHub does it, so every link still points to the right place.
How to use
- Paste your Markdown.
- Choose which heading levels to include in the table of contents.
- Copy the table of contents to the top of your document.
Frequently asked questions
Is my text sent to a server?
No. The tool runs entirely in JavaScript in your browser, and the text you paste never leaves your device.
Related tools
Markdown Editor with Live PreviewWrite Markdown with a live preview, with support for tables, task lists and code blocks, and export to HTML or an .md file.Markdown FormatterMakes Markdown clean and consistent: a space after #, one bullet style, blank lines around headings, and no trailing whitespace.
More Text tools
Markdown Link ExtractorLists links, images, reference links and bare URLs in a Markdown file, with line numbers.HTML to Markdown ConverterConverts HTML code (blog posts, web pages) into tidy Markdown, keeping headings, lists, links, tables and code blocks.Markdown to HTML ConverterConverts Markdown into clean HTML with scripts and event attributes filtered out, and can add ids to headings.Markdown Diff CheckerCompares two Markdown versions as plain text, line by line, highlighting added lines, removed lines and changed words.Markdown File ViewerOpen an .md file or paste content to read it formatted in a wide layout, with external images loaded only if you allow it.Text CleanerMerges extra spaces, fixes spacing around punctuation, removes blank lines and invisible characters, and normalizes Vietnamese Unicode in one pass.
See all text tools