AZ Tools

Markdown Table of Contents Generator

Convert

Paste Markdown and get a ready-to-paste table of contents. Anchors use the same slug rules GitHub or GitLab apply to heading IDs (lowercase, Unicode-aware, dashes for spaces, deduplicated with `-1`, `-2`…). Choose bullet list (`- [text](#slug)`), nested numbering (`1.`, `1.1`…), or HTML `<ul><li>`. Filter min/max heading level so a TOC of a long doc only shows H2–H3.

Table of contents
TOC appears here.

How to use

  1. Paste your Markdown in the left panel.
  2. Choose style (bullet / numbered / HTML), slug rule (matching where you'll publish), and min/max heading level.
  3. Copy the TOC and paste it at the top of your document.

Frequently asked questions

Why three slug styles?
GitHub's slug rule keeps Unicode (`한글` → `한글`). GitLab strips more aggressively. 'Simple' is ASCII-only — useful for generic Markdown renderers.
How are duplicate headings handled?
Same as GitHub: the first instance gets the plain slug, later ones append `-1`, `-2`, etc. Anchors will resolve correctly.
Why is code block content ignored?
Lines starting with `#` inside fenced code (` ``` `) are usually shell prompts or comments, not headings. The parser tracks fence state to skip them.
Does GitHub render `[text](#slug)` correctly?
Yes — GitHub auto-generates anchor IDs for every heading and resolves matching link slugs. Use the GitHub slug style here.

Related tools