Markdown TOC Generator
A free tool to automatically generate a Table of Contents (TOC) from Markdown text.
Customize heading levels and list formats. Works entirely in your browser for total privacy.
About Markdown TOC Generator
A free tool that automatically generates a Table of Contents (TOC) for documents written in Markdown. It saves you the trouble of manually creating a TOC when writing technical articles for platforms like GitHub READMEs or blogs.
You can finely customize the extraction range of heading levels (h1-h6) and the output format, such as unordered lists (-) or ordered lists (1.).
All processing is completed within your browser, so the text data you enter is never sent to an external server. You can safely use it for confidential documents or private notes without worrying about information leaks.
How to Use
Enter Markdown
Paste or type the Markdown text you want to create a TOC for in the left input area.
Set Options
Select the "Max Heading Level (h2-h6)" to extract and the "List Format (Unordered / Ordered)" to output.
Generate and Copy TOC
Click the "Generate TOC" button, and the TOC will be output in the right area. Click the copy button and paste it into your original document.
Glossary
- Markdown
- A lightweight markup language for formatting text. It uses symbols to easily express headings, lists, links, etc., and is widely used, especially among programmers.
- TOC (Table of Contents)
- Placed at the beginning of a long document, it allows readers to quickly access the section they want, improving readability.
- Heading Level
- An indicator of the hierarchical structure of a document, corresponding to HTML's h1 to h6 tags. In Markdown, the level is expressed by the number of "#"s.
- Anchor Link
- A link to jump to a specific location within a page. In a Markdown TOC, it jumps by specifying an automatically generated ID (e.g., `#heading`) based on the heading text.
- Client-side Processing
- A mechanism that runs a program only within the user's browser without communicating with a server. It has no risk of data leaks and offers excellent security.
FAQ
- Q.Is the Markdown data I enter saved on the server?
- No, it is not saved. Since this tool uses client-side processing that runs entirely within your browser, the text you enter is never sent to an external server. You can safely use it even for documents containing confidential information.
- Q.Clicking the generated TOC link doesn't jump.
- Depending on the platform (GitHub, etc.), the rules for automatically generating anchor IDs from headings may vary. This tool generates IDs based on common rules (lowercase, replacing spaces with hyphens, etc.), but you may need to modify them manually to fit the platform's specific specifications.
- Q.Can I exclude a specific heading from the TOC?
- In the current version, all headings below the specified 'Max Heading Level' are extracted. There is no feature to exclude only specific headings, so please delete them manually after generation.
- Q.Are '#'s inside code blocks also extracted?
- No, our tool's extraction algorithm is designed to ignore text inside code blocks surrounded by three backticks (```). Therefore, comments inside code will not be mistakenly extracted as a TOC.
- Q.Does it support non-English headings?
- Yes, it does. Headings in Japanese, English, and other languages will be correctly extracted and generated as a TOC. However, since the anchor link ID generation rule is based on English, non-English headings might be URL-encoded in some cases.
Use Cases
Creating GitHub READMEs
Add a TOC to long README.md files for open-source projects to make it easier for contributors and users to find information.
Writing Technical Blogs
When posting long technical articles on platforms, place a TOC at the beginning to enhance reader convenience.
Organizing Internal Documents
Add a TOC to internal manuals created with Markdown-compatible tools like Notion to improve searchability and readability.
Organizing Personal Notes
Add a TOC to the massive amount of notes accumulated in knowledge management tools like Obsidian or Logseq to organize your thoughts and review them smoothly.
Send Feedback
Please let us know your thoughts to help us improve the tool.
Feedback is temporarily suspended
The server is busy or spam protection is active. Please try again later.