Markdown TOC Generator

Generate Clickable TOCs from Markdown Headers

Extract headers from your Markdown text to generate a Table of Contents (TOC) with internal anchor links. Ready to paste into GitHub READMEs, Notion, and technical blogs without installing software.

How to Use

Auto-generate a Markdown TOC in 3 steps. Customize depth and link settings.

STEP1

Input Text and Select Extraction Level

Paste your Markdown text into the left input area. Then, select the header levels (H1 to H4) you want to extract using the options at the top.

Input Markdown text and select target headers
STEP2

Customize Output Format

Toggle the "List Format" and "Internal Links" checkboxes to match your needs. Enabling internal links will generate an anchor-linked TOC that jumps to each section.

Generate TOC with list and anchor link settings
STEP3

Copy the Generated TOC

Once the table of contents appears in the right output area, simply copy it and paste it into your Markdown document.

Copy the output TOC for use
Key Features

One-Click Extraction

Just paste your text, and the tool accurately picks up only the headers from complex Markdown structures.

Flexible Hierarchy Levels

Freely select which header depths to include in the TOC, ranging from H1 down to H4.

In-Page Anchor Link Support

Generates a TOC with internal links that work on platforms like GitHub.

Auto List Formatting

Automatically organizes and outputs proper indents and list markers (-) based on the header hierarchy.

Secure Local Processing

No data is sent to our servers. Safely process unpublished internal documents completely within your browser.

Ideal For

Structuring Long GitHub READMEs

Add scannable navigation tables to project README files so contributors can jump directly to specific sections.

Adding Clickable Section Links to Technical Articles

Generate in-page jump links for long-form tutorials on platforms like Dev.to, Hashnode, or Hugo blogs.

Automating Internal Wiki Navigation

Eliminate manual slug generation and in-page anchor ID maintenance across company documentation.

All Markdown Users

A table of contents gives you an instant overview of even the most complex document structures.

Frequently Asked Questions
How are the internal anchor links generated?
Based on standard Markdown specs, we automatically generate anchor links by converting header text to lowercase and replacing spaces with hyphens (e.g., `[Header](#header)`). This works natively on GitHub and most platforms.
What happens if headers contain code blocks or special characters?
The tool tries to extract them as plain text as much as possible, though some complex markdown inside headers may not match the anchor ID exactly depending on the platform.
Is this tool free to use?
Yes. No registration or payment is needed. Generate as many Markdown TOCs as you need.
Is it safe to input highly sensitive text?
Yes. Header extraction and link generation run completely within your local browser. Document outlines and heading hierarchies are never stored or transmitted.
Related Tools