Table of Contents Creator

Generate a table of contents from your text headings

Automatically create a table of contents from your Markdown or HTML headings with customizable formatting.

Input Text

Supported Formats

  • Markdown: # ## ### #### ##### ######
  • HTML: <h1> <h2> <h3> <h4> <h5> <h6>
  • Mixed formats supported

Settings

Generated Table of Contents

Features

  • Auto-detect Markdown & HTML headings
  • Multiple output formats
  • Customizable heading levels
  • Optional numbering
  • Anchor link generation
  • Nested list support
  • Copy & download options

Use Cases

  • Documentation & README files
  • Blog posts & articles
  • Technical guides
  • Academic papers
  • E-books & long-form content
  • Wiki pages
  • User manuals

Output Formats

Markdown:

Clickable links with # anchors, perfect for GitHub

HTML:

Nested <ul> lists with proper structure

Numbered:

Hierarchical numbering (1.1, 1.2, 2.1, etc.)

Plain:

Simple indented list without numbers

What is a Table of Contents Generator?

A table of contents (TOC) generator is an automated tool that scans your document's headings and creates a structured, navigable index. Our free online TOC creator supports both Markdown and HTML formats, automatically detecting heading levels (H1-H6) and generating clickable links with anchor tags. Perfect for technical writers, bloggers, documentation teams, and content creators who need professional table of contents for their long-form content.

Key Features of Our TOC Generator

  • Multi-Format Support: Works with Markdown (#, ##, ###) and HTML (<h1>, <h2>, <h3>) headings seamlessly
  • Multiple Output Styles: Generate Markdown with links, HTML nested lists, numbered plain text, or simple indented lists
  • Customizable Levels: Filter headings by minimum and maximum levels (H1-H6) to control TOC depth
  • Automatic Anchor Generation: Creates SEO-friendly URL slugs for each heading automatically
  • Hierarchical Numbering: Optional multi-level numbering (1.1, 1.2, 2.1, etc.) for professional documents
  • Instant Preview: See your table of contents in real-time as you adjust settings
  • One-Click Export: Copy to clipboard or download as .md, .html, or .txt files

How to Use the Table of Contents Creator

  1. Paste Your Content: Copy your document with Markdown or HTML headings into the input area
  2. Choose Output Format: Select from Markdown, HTML, Numbered, or Plain text styles
  3. Set Heading Levels: Define minimum and maximum heading levels to include (H1-H6)
  4. Customize Options: Toggle numbering and links based on your needs
  5. Generate TOC: Click "Generate TOC" to create your table of contents instantly
  6. Copy or Download: Use the copy button for quick pasting or download as a file

Common Use Cases for TOC Generators

For Technical Writers:

  • API documentation
  • Software user guides
  • Technical specifications
  • Installation manuals

For Content Creators:

  • Long-form blog posts
  • Tutorial articles
  • E-books and guides
  • Research papers

For Developers:

  • GitHub README files
  • Project documentation
  • Wiki pages
  • Changelog files

For Academics:

  • Thesis and dissertations
  • Research papers
  • Course materials
  • Study guides

Understanding TOC Output Formats

Markdown Format

Generates a Markdown-compatible table of contents with clickable anchor links. Perfect for GitHub README files, GitLab wikis, and static site generators like Jekyll or Hugo. Links use the # anchor format that works automatically with most Markdown processors.

HTML Format

Creates properly nested HTML <ul> and <li> elements with semantic structure. Ideal for web pages, WordPress posts, and content management systems. Includes optional CSS class names for easy styling.

Numbered Format

Produces hierarchical numbering (1, 1.1, 1.2, 2, 2.1, etc.) in plain text format. Great for formal documents, academic papers, legal documents, and printed materials where traditional numbering is required.

Plain Format

Simple indented list without numbers or links. Useful for quick outlines, content planning, and situations where you need a clean, minimal structure without additional formatting.

Why Use an Automatic TOC Generator?

  • Save Time: Generate comprehensive table of contents in seconds instead of manually creating and updating links
  • Improve Navigation: Help readers quickly find relevant sections in long documents
  • Boost SEO: Search engines favor well-structured content with clear heading hierarchies
  • Ensure Consistency: Maintain uniform formatting across all your documentation
  • Professional Appearance: Add polish to your documents with properly formatted TOCs
  • Easy Updates: Regenerate TOC instantly when you add or modify headings

Frequently Asked Questions

Can I use both Markdown and HTML headings together?

Yes! Our TOC generator automatically detects and processes both Markdown (#) and HTML (<h1>) heading formats in the same document, making it perfect for mixed-format content.

How are anchor links generated?

Anchor links are automatically created by converting heading text to lowercase, removing special characters, and replacing spaces with hyphens. For example, "Getting Started Guide" becomes "#getting-started-guide".

What's the difference between min and max levels?

Min level sets the starting heading level (e.g., H1), and max level sets the deepest level to include (e.g., H3). This lets you create TOCs that only show top-level sections or include detailed subsections.

Can I customize the numbering style?

The tool uses hierarchical decimal numbering (1, 1.1, 1.2, 2, 2.1, etc.) which is the standard for most professional documents. You can toggle numbering on or off based on your needs.

Does this work with GitHub README files?

Absolutely! The Markdown format output is specifically designed to work perfectly with GitHub, GitLab, Bitbucket, and other platforms that support Markdown with automatic anchor link generation.

Best Practices for Table of Contents

  • Use clear, descriptive headings that accurately reflect section content
  • Maintain consistent heading hierarchy (don't skip levels like H1 to H3)
  • Keep TOC at the top of your document for easy access
  • Limit TOC depth to 3-4 levels for better readability
  • Update your TOC whenever you modify document structure
  • Use numbering for formal documents, skip for casual content
  • Test all anchor links to ensure they work correctly