Skip to content

markdown toc generator

Free Markdown tool

A table of contents is one paste away.

Drop in your README or blog draft. Get a clickable contents list with the right anchor links for GitHub, GitLab or Bitbucket, then copy it back in.

  • Runs in your browser
  • Nothing uploaded
  • No signup
01 · The editor

Paste, pick a platform, copy.

The list updates as you type. Click any entry in Preview to jump to that heading in your text.

README.md
Table of contents
0 headings found0 in the list0 lines

The full-document copy wraps the list in <!-- TOC --> markers, so pasting it back later replaces the old list.

02 · Anchor lab

One heading, three different anchors.

Every platform turns a heading into a link target its own way. Type a heading and see what each one produces, including the second time it appears.

GitHub - repeats

First time
Second time

GitLab - repeats

First time
Second time

Bitbucket _ repeats

First time
Second time

Other platforms such as dev.to build anchors differently. Check one link after publishing, or use the HTML list format to set your own ids.

03 · What gets picked up

Real headings in. Code comments out.

Result with From H2 on GitHub

- [Installation](#installation)
- [Usage](#usage)
  - [Basic usage](#basic-usage)
- [Usage](#usage-1)

The title is left out because the list starts at H2. The repeated Usage heading gets -1 added, just as the platform does.

04 · Questions

Before you paste.

Short answers about anchors, privacy and keeping your list fresh.

Do I need a plugin for a Markdown table of contents?

No. A table of contents in Markdown is a nested list of links, so the generated text works anywhere that renders Markdown. Some sites also offer an automatic list, but this one always works.

Why does a link not jump to its heading?

The anchor style must match the platform that shows the page. Pick GitHub, GitLab or Bitbucket above. If two headings share a name, the second one gets a number added.

Are headings inside code blocks counted?

No. Lines between code fences are skipped, so a comment such as # install in a shell example never reaches your list.

How do I update the list after editing my document?

Use Copy with document the first time. It wraps the list in TOC markers. Paste the edited document back and the old list is replaced instead of duplicated.

Is my document uploaded or stored?

No. Everything runs in your browser. Your text is not sent to a server and is not saved.

Ship the readme.

Paste, pick a platform and copy. Your readers will find every section.

Back to the editor