TFT

Markdown Table of Contents Generator

Automatically create a clickable table of contents from your Markdown headers. Customize the format and depth. Great for long READMEs and documentation.

How the Markdown TOC Generator Works

Paste your Markdown document into the input field. The generator scans for headers (# through ######) and builds a table of contents automatically. Results update as you type.

Choose your format: Bullet List creates indented bullet points, Numbered List uses sequential numbers, Inline Links places all links on one line separated by pipes. Each format suits different documentation styles.

Anchor links are generated automatically from header text. Spaces become hyphens, special characters are removed. The preview shows how the TOC will render. Copy the generated TOC and paste it at the top of your document.

When You'd Actually Use This

Creating README navigation

Your project README has grown to 500+ lines. Add a TOC so users can jump to Installation, Usage, API, or Examples sections quickly.

Writing technical documentation

Long documentation needs navigation. Generate a TOC for your user guide, API reference, or tutorial series to improve findability.

Creating GitHub wiki pages

GitHub wikis support Markdown with anchor links. A TOC makes multi-section wiki pages navigable without relying on browser outline features.

Writing blog posts in Markdown

Static site generators like Jekyll and Hugo use Markdown. Add a TOC to long-form blog posts for better reader experience and SEO.

Creating course materials

Your course notes span multiple topics. A TOC helps students navigate between lessons, exercises, and reference sections efficiently.

Maintaining changelog files

Long changelogs benefit from version navigation. Generate a TOC linking to each version section for quick release note access.

What to Know Before Using

Anchor links must match your platform.GitHub, GitLab, and BitBucket generate slightly different anchors. This tool uses GitHub-style anchors. Verify links work on your target platform.

Special characters are stripped."What's New?" becomes "whats-new". Question marks, exclamation points, and punctuation are removed from anchor IDs.

Duplicate headers get same anchor.Two "Installation" headers both link to #installation. The second one won't scroll correctly. Make headers unique for reliable navigation.

Inline format works for summaries.Inline links (Header1 | Header2 | Header3) are compact but less scannable. Use for short documents or summary sections.

Pro tip: Place your TOC after the title but before the introduction. Readers expect navigation at the top. Update the TOC whenever you add or rename sections.

Common Questions

Does this work with GitHub Flavored Markdown?

Yes. GitHub-style anchors are the default. Links work in GitHub READMEs, Issues, and Gists. GitLab and most other platforms use compatible formats.

Can I exclude certain headers from the TOC?

This tool includes all headers. To exclude some, manually edit the generated TOC. Some static site generators support TOC exclusion via comments.

What header levels are included?

All levels from h1 (#) through h6 (######) are included. Deep nesting (beyond h4) is rare but supported.

How do I update the TOC when I change headers?

Regenerate the TOC with the updated document. Replace the old TOC with the new one. Some editors have plugins that auto-update TOCs.

Can I customize the anchor format?

This tool uses standard GitHub anchors. For custom formats, you'd need to modify the generated TOC manually or use a different tool.

Does numbered list restart at each level?

No, numbering is sequential throughout (1, 2, 3...). For nested numbering (1, 1.1, 1.2), you'd need to edit manually after generation.

Will the TOC work in PDF exports?

Markdown-to-PDF tools handle anchor links differently. Some preserve them, some don't. Test your specific export toolchain for PDF compatibility.