Skip to content

📑 Markdown TOC Generator

Paste your Markdown and instantly generate a nested table of contents from h1–h6 headings. Supports GitHub and GitLab slug styles, Markdown/HTML/plain output, depth limits, and numbered lists.

✅ 100% free · no signup · browser-only

🔒 About Privacy

⚙ Options

Preview (rendered HTML)

📖 How to Use

  1. 1
    Paste Markdown
    Paste your full Markdown into the left text area.
  2. 2
    Adjust options
    Pick output format (Markdown / HTML / plain), slug style, min/max heading level, and numbering.
  3. 3
    Copy or download
    Copy the generated TOC to your clipboard, or download as .md / .html / .txt.

❓ FAQ

Will the anchors match GitHub exactly?
Yes. Our slugger mirrors GitHub: lowercased, non-alphanumeric stripped, spaces become hyphens, emojis removed, and duplicates suffixed with -1, -2…
Is my Markdown sent to your server?
No. All processing is in your browser via plain JavaScript. You can verify in the Network tab.
Are # signs inside code blocks ignored?
Yes. Fenced code blocks (``` and ~~~) are excluded from heading detection. Inline code hashes are skipped too.
🐛 Found a bug or issue with this tool?

Free to use, no signup. Even just the steps to reproduce are helpful. Reports go directly to the operator and help us fix issues.

* Browser info (UA / screen / language / URL) is sent automatically to help reproduce the issue