markdown-toc is a JavaScript API and CLI for generating tables of contents from Markdown files. It uses Remarkable to parse Markdown headings and turn them into linked TOC entries. Developers can run it from the command line, inject a TOC directly into a file, or use it programmatically from Node.js. The tool can also output JSON so applications can render their own TOC templates. It includes options for heading depth, bullet style, filtering, slug generation, indentation, and first-heading behavior. It is especially useful for maintaining README files, documentation pages, and generated docs where headings change over time.

Features

  • Markdown table of contents generation
  • CLI and Node API support
  • In-place README injection
  • JSON TOC output
  • Custom slug generation
  • Heading filtering and depth control

Project Samples

Project Activity

See All Activity >

Categories

Markdown Editors

License

MIT License

Follow markdown-toc

markdown-toc Web Site

Other Useful Business Software
Compliant and Reliable File Transfers Backed by Top Security Certifications Icon
Compliant and Reliable File Transfers Backed by Top Security Certifications

Cerberus FTP Server delivers SOC 2 Type II certified security and FIPS 140-2 validated encryption.

Stop relying on non-certified, legacy file transfer tools that creak under the weight of modern security demands. Get full audit trails, advanced access controls and more supported by an award-winning team of experts. Start your free 25-day trial today.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of markdown-toc!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Markdown Editors

Registered

2026-07-03