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.
TOC appears here.
How to use
- Paste your Markdown in the left panel.
- Choose style (bullet / numbered / HTML), slug rule (matching where you'll publish), and min/max heading level.
- 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
CSS Unit Converter
Convert between px, rem, em, pt, vw, vh, and % using your own base font size and viewport.
JSON ↔ YAML Converter
Convert JSON to YAML or YAML to JSON — pick the indent and copy the result.
Data Size Converter
Convert between bytes, KB, MB, GB, TB — in decimal (1000) or binary (1024).
Roman Numeral Converter
Convert between Arabic numbers and Roman numerals from 1 to 3999.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
Unit Converter
Convert length, weight, temperature, area, volume, speed, and time.