Optimize & Edit MD

Generate a Markdown TOC from your document headings.

Paste the Markdown, choose the heading depth, and insert a linked table of contents that matches the current document structure.

What you get

  • Reads heading hierarchy from the Markdown itself.
  • Lets you control the maximum depth included in the generated TOC.
  • Uses a replaceable marker block so TOC regeneration stays clean.

Optimizer

Generate a linked table of contents from headings.

Output shape

The tool inserts a marker-based TOC block at the top so repeated runs can replace the existing TOC instead of stacking duplicates.

0 chars

Why this page exists

TOC generators help once the document is long enough to need navigation.

Markdown documents often start small and grow into something much larger: guides, RFCs, release notes, onboarding docs, or knowledge-base pages. At that point, a heading-based TOC becomes more than a nice extra.

This page turns the document structure you already wrote into a linked table of contents, which is much faster than maintaining the anchor links by hand.

How it works

A short path from messy input to usable Markdown.

01

Paste the Markdown document

Start with the draft that already has a heading structure.

02

Choose the TOC depth

Decide how many heading levels should be included in the generated table of contents.

03

Insert the generated block

Copy or download the Markdown with the TOC block added at the top of the document.

Best for

Typical jobs this converter handles well.

Long-form documentation

Add fast navigation to setup guides, specs, and internal docs.

Release notes and changelogs

Help readers jump between versions, sections, or grouped updates more easily.

Knowledge-base pages

Insert heading links into notes that have grown too long to scan linearly.

FAQ

Questions people usually ask before converting.

How does the TOC get inserted into the Markdown?

The page adds a marker-based TOC block near the top of the document, so running the generator again can replace the previous TOC cleanly instead of duplicating it.

What heading levels does it support?

It reads Markdown headings from H1 through H6 and lets you choose how deep the generated TOC should go.

Will it work with GitHub-style heading anchors?

Yes. The generator builds Markdown links using a slug pattern that is intended to match common GitHub-style heading anchors for normal Markdown documents.

Continue with

Related routes inside JustMarkdown.

People rarely stop at one conversion. These adjacent pages pick up the next task in the same workflow.