Markdown TOC Generator — Heading Outline & Anchor Links
Generate a table of contents from any markdown document: heading outline, GitHub-style anchor slugs, and nested copy-ready markdown or HTML lists.
More tools
All free, all private — everything runs in your browser.
Markdown to HTML Converter
Convert markdown to clean HTML — copy a fragment, or download a standalone .html document with inline styles that looks right anywhere.
Markdown to Plain Text
Strip markdown syntax to clean readable prose — headings, emphasis, links, and tables normalized — for email, docs, and plain-text previews.
Word Count & Readability
Live document stats for markdown: words, characters, sentences, paragraphs, reading time, and heading structure — computed locally, nothing uploaded.
Markdown Live Editor
Write markdown with a live split-pane preview: headings, lists, tables, code, quotes, and links rendered instantly. Nothing uploaded.
Markdown Table Generator
Build markdown tables in a visual grid — add rows and columns, align cells — and copy the pipe-table source that renders everywhere.
Front-Matter Editor
Edit and validate YAML front matter for Jekyll, Hugo, and static-site posts: types checked, required fields flagged, dates and booleans normalized.
How to use TOC Generator
- 1Paste your document; the heading outline appears with levels and anchors.
- 2Set the maximum depth to include (e.g. h1–h3 for a compact TOC).
- 3Switch between markdown and HTML output — anchors are GitHub-compatible slugs.
- 4Copy the TOC into the top of your document.
TOC Generator FAQ
- Do the anchor links match GitHub's slugs?
- Yes — the slugger implements GitHub's algorithm: lowercase, strip punctuation, spaces to hyphens, with -2, -3… suffixes for repeated headings. Links pasted into a GitHub README jump to the right heading.
- Can I limit the TOC depth?
- Yes — include only headings up to a chosen level (e.g. h2–h3 for a compact README TOC). The outline view can show every level regardless.
- Markdown list or HTML output?
- Both. Copy a nested markdown list (works in any renderer that auto-links anchors) or a nested HTML <ul> with inline styles for pasting into email or a CMS.
- What about documents with duplicate heading text?
- The slugger deduplicates exactly like GitHub — the first occurrence gets the bare slug, later ones get numeric suffixes — so every TOC link is unique and correct.