# Markdown TOC Generator

Generate a table of contents from Markdown headings with GitHub-style anchor links

> Canonical page: https://elysiatools.com/en/tools/markdown-toc-generator

- **Category:** Format Conversion

- **Keywords:** markdown, toc, table of contents, heading, anchor, outline, 目录, markdown toc, table of contents generator

## Overview

The Markdown TOC Generator automatically creates a structured table of contents from your Markdown headings. It generates GitHub-style anchor links, allowing readers to navigate long documents, READMEs, or wiki pages with ease.

## Inputs

- **Markdown Input** (textarea): Paste your Markdown here. TOC is generated from # headings...
- **Minimum Heading Level** (select)
- **Maximum Heading Level** (select)
- **List Style** (select)
- **Indent Style** (select)
- **Include Anchor Links** (checkbox)
- **Output Format** (select)
- **Wrap in Code Block** (checkbox)

## When to use

- When writing long-form documentation or README files that need a clear navigation structure.
- When you want to automatically generate GitHub-compatible anchor links for your Markdown headings.
- When formatting wiki pages or technical blogs where readers benefit from a quick overview of the content outline.

## How it works

- Paste your raw Markdown text into the input area.
- Configure your preferences, such as the minimum and maximum heading levels (H1 to H6), list style, and indentation.
- Choose whether to include anchor links and select your desired output format (Markdown, HTML, or both).
- Copy the generated table of contents directly into your document.

## Use cases

- Generating a table of contents for a project README.md file on GitHub.
- Creating structured navigation outlines for technical documentation and user guides.
- Formatting blog posts written in Markdown to improve readability and SEO structure.

## Frequently asked questions

### How does the generator create anchor links?

It formats heading text into GitHub-style slugs, converting characters to lowercase and replacing spaces with hyphens.

### Can I limit the table of contents to specific heading levels?

Yes, you can set the minimum and maximum heading levels (from H1 to H6) to filter out minor subheadings.

### What list styles are supported?

You can choose between unordered lists (using hyphens) and ordered lists (using numbers).

### Does this tool support HTML output?

Yes, you can output the table of contents as Markdown, HTML, or a combination of both.

### Can I indent the list items with tabs instead of spaces?

Yes, the tool supports indentation using 2 spaces, 4 spaces, or tab characters.

## Related tools

- [Webpage to Markdown Converter](https://elysiatools.com/en/tools/webpage-to-markdown-converter): Fetch a live web page by URL and convert it to clean Markdown — headings, links, lists, code and optionally images and tables — with reader-mode junk stripping.
- [Slug Generator](https://elysiatools.com/en/tools/slug-generator): Generate clean URL slugs from any text, with built-in Chinese-to-Pinyin conversion. Collapse separators, lowercase, and optional max-length word-aware truncation.
- [Truth Table Generator](https://elysiatools.com/en/tools/truth-table-generator): Complete truth table (≤ 6 variables, 64 rows) with alphabetical variable order, per-row function values, and canonical Σm/ΠM forms.
- [Markdown to Plain Text](https://elysiatools.com/en/tools/markdown-to-plain-text): Convert Markdown formatted text to plain text by removing all Markdown syntax and formatting
- [Mean Platelet Volume (MPV) Analyzer](https://elysiatools.com/en/tools/mean-platelet-volume-analyzer): Analyze Mean Platelet Volume (MPV) in fL, an index of platelet production kinetics. Reference range ≈ 7.5–11.5 fL (lab- and method-dependent). Low MPV (< 7.5 fL, small old platelets) indicates suppressed marrow production (aplastic anemia, chemotherapy/radiation, recent platelet transfusion, iron-deficiency regeneration, Wiskott-Aldrich). High MPV (> 11.5 fL, large young platelets) indicates peripheral destruction with compensatory turnover or macrothrombocytopenia (immune thrombocytopenia ITP, post-splenectomy, myeloproliferative neoplasms, severe sepsis in recovery, Bernard-Soulier / MYH9, megaloblastic anemia; elevated MPV after acute MI marks platelet activation and adverse prognosis). Optionally enter the platelet count to refine the differential: low platelets + high MPV → peripheral destruction; low + low → underproduction; high + low → reactive thrombocytosis; high + high → myeloproliferative neoplasm. Pre-analytical caveat: platelets swell in EDTA over ~2 h raising MPV, and values are method-dependent (impedance > optical > immuno) — compare within the same lab and analyzer. Derived from Bath 1996, Leader 2012, Vagdatli 2010, and MDCalc. Not medical advice.
- [Array Element Deleter](https://elysiatools.com/en/tools/array-element-deleter): Delete specific elements from arrays with support for multiple deletion methods
- [Barcode Generator](https://elysiatools.com/en/tools/barcode-generator): Generate CODE128 barcode from text with fixed dimensions
- [Email Signature HTML Builder](https://elysiatools.com/en/tools/email-signature-html-builder): Generate a clean, copy-paste HTML email signature that renders correctly in Gmail, Outlook, and Apple Mail — with avatar/logo, social icons (auto-detected from your links), accent color, light/dark/auto theme, and a table-based email-safe layout using inline styles. Copy the raw HTML and paste straight into your mail client.

## Samples

- [Markdown Samples](https://elysiatools.com/en/samples/markdown-samples): Markdown format examples from simple to complex document structures
- [Markdown Viewer Samples](https://elysiatools.com/en/samples/markdown-viewer-samples): Sample Markdown files for README preview, documentation rendering, and rich-text markup tests
- [Markdown Slide Deck Samples](https://elysiatools.com/en/samples/md-slide-deck-to-pdf): Remark/Marp style Markdown slide decks for testing PDF export layouts
- [PDF Samples](https://elysiatools.com/en/samples/pdf-samples): Generated PDF samples from tools dated 2026-02-01 to 2026-02-10
