Sashmark

Markdown table of contents generator

Paste Markdown or open a .md file, and get a nested list of links to its headings, ready to copy or save as .md. Pick which heading levels to list. It is free and runs in your browser.

Your file stays on your computer. The conversion runs in this browser tab. Nothing is uploaded, stored or logged.

Paste some Markdown with headings to see the list.

Preview

A Markdown table of contents is a list of links near the top of a file, one per heading, where each link points at the id of its heading, like [Rollback steps](#rollback-steps).

How to make a Markdown table of contents

  1. Paste your Markdown in the box, or choose Open a .md file, or drop the file on the box.
  2. Pick the heading levels to list. Levels 2 to 3 suit most files.
  3. Check the count line and the preview against your headings.
  4. Choose Copy Markdown, or Save as .md, and paste the list near the top of your file.
  5. Click a few links in your own viewer to check that they land on their headings.

Join the Sashmark waitlist

Sashmark is a Markdown reader in development for files your AI agents write. It is planned to let you read and edit .md files like this one on your desktop.

Questions

Is my file uploaded?

No. The conversion runs in your browser on your own computer. The page sends nothing about your file anywhere, and nothing is stored or logged.

Is the table of contents generator free?

Yes. There is no sign-up and no limit on how many files you use it on.

How are the link targets made?

They follow a common style: the heading text in lowercase, spaces turned into hyphens, and most punctuation dropped. A repeated heading gets -1, -2 and so on. Other viewers make ids their own way, so click a few links in yours to check.

Which headings are listed?

Headings that start with # signs and headings underlined with = or - signs, at the levels you pick. Lines inside code blocks and front matter at the top of the file are not headings, so they are left out.

Why does a link in my list do nothing?

The target after the # has to match the id your viewer gave the heading. If the heading was reworded after you made the list, make the list again.

What is Sashmark?

Sashmark is a Markdown reader in development for people whose AI agents write Markdown. It is planned to let you read and edit .md files like yours on your desktop.