Skip to content
← Back

Markdown TOC Generator - Online Table of Contents Creator

Data
Runs locally · Not uploaded

Free online Markdown table of contents generator that auto-parses headings to create TOC with GitHub/GitLab anchor format support.

Was this result helpful?

For local tools, open DevTools → Network and search your input — it should not appear in requests.

Usage Guide

Derive a Markdown TOC with min/max levels, list styles, and GitHub/GitLab/custom anchors — local only.

1. Generate

Fenced fake headings are skipped.

  1. Paste Markdown.
  2. Set levels and list style.
  3. Copy or insert TOC.

2. Anchor differences

GitHub and GitLab IDs can differ; custom templates available.

3. Numbering

  • Unordered for most docs.
  • Space indent nests better.
  • Avoid self TOC heading.

4. When to skip

  • Complex headings.
  • Short articles.
  • Fix skipped levels first.

5. Pair tools

Preview hierarchy; align custom anchors with slugify when needed.

6. Checklist

  • Often exclude H1.
  • CJK may keep characters.
  • Blank line after insert.

7. Reminder

Headings become contracts once linked.

FAQ

There is no upload step — heading parsing happens entirely in your browser and the document never reaches a server.

GitHub-style and GitLab-style anchors, plus a custom anchor template that combines text and slug via placeholders. All six levels H1 to H6 are recognized, with min/max heading levels controlling TOC depth, plus ordered or unordered lists and numbering styles. The result can be copied on its own or inserted at the top of the document — leave a blank line after insertion so it doesn't stick to the first paragraph.

By design: pseudo-headings inside fenced code blocks are filtered so sample code never gets mistaken for the article outline.

It can. The two platforms differ in casing, punctuation stripping, and HTML handling, and some static site generators even keep Chinese characters where GitHub would not. When publishing across platforms, spot-check whether the first two TOC links jump correctly; if not, switch the anchor style or align with a custom template.

Three cases: for short pieces (roughly under a screen and a half) a TOC is noise; badly skipped heading levels should be fixed first, or the indentation misleads readers; headings containing inline code or complex links parse unreliably, so hand-write those. Also keep a top-level Contents heading out of the generated range to avoid self-reference noise.

Anchors follow headings — renaming a heading renames its anchor, which bites hardest for sections cited by external links. Before a major rename, search for old anchor references and set up redirects or keep the old title as an alias.

Related Tools

Related Articles