Category: Developer tools

Markdown Table of Contents Generator

System ideaMissing a tool?

Build a linked table of contents from Markdown headings

Paste Markdown and get a nested table of contents built from its headings, linked with GitHub-style anchor slugs, with a chosen heading-level range. Runs entirely in your browser.

Table of contents
- [Getting Started](#getting-started)
  - [Installation](#installation)
  - [Configuration](#configuration)
    - [Environment Variables](#environment-variables)
    - [Feature Flags](#feature-flags)
  - [Deployment](#deployment)

Everything on this page is processed in your browser. Nothing is uploaded.

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Long Markdown documents benefit from a table of contents, but keeping one in sync by hand after every heading edit is easy to forget. This tool scans the document for ATX (`#`) headings, builds a nested list matching their levels, and slugifies each heading the way GitHub and most Markdown renderers do — lowercased, punctuation stripped, spaces turned to hyphens, duplicates suffixed with a number — so the generated links land on the right heading.

How to use it

  1. Paste your Markdown, or load the example.
  2. Choose the minimum and maximum heading levels to include.
  3. Copy the generated table of contents into your document.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is my Markdown uploaded anywhere?
No. Parsing and slug generation happen in JavaScript running in the page, so your document never leaves your device.
How are anchor slugs generated?
The same way GitHub does: the heading text is lowercased, punctuation is stripped, spaces become hyphens, and a numeric suffix is added if the same slug appears more than once.
Does it handle headings inside code blocks?
Yes, lines inside fenced code blocks are skipped so a `#` in a code comment or shell prompt is never mistaken for a heading.