10 Best Table Of Contents JavaScript Plugins (2025 Update)
What Is Table Of Contents
Table Of Contents (TOC) is a kind of in-page navigation that displays a list of anchor links pointing to the different page sections within the HTML document.
It can help improve the user experience on the long webpage thereby increasing your ranking in search engines.
In general, a table of contents plugin automatically exacts content from heading elements (h1, h2, h3, etc) within the document and generates anchor links based on the CSS ID you assign.
Clicking the anchor links will scroll the page to the corresponding page sections for better in-page navigation experience.
The Best Table Of Contents Plugin
This is a collection of 10 best (most downloaded) table of contents jQuery and Vanilla JavaScript plugins for your long web content to improve user experience and boost search engine rankings. Have fun.
Originally Published Mar 18 2019, updated Feb 11 2025
Table of contents:
Best jQuery Table Of Contents Plugins:
Sidebar Table Of Contents Generator with jQuery and Bootstrap - Bootstrap Toc
A lightweight jQuery & Bootstrap plugin used to generate a sticky, collapsible table of contents from heading tags within the document.
Accordion-style Sticky Table Of Contents - jQuery Catalog.js
A jQuery plugin for generating a sticky table of contents from page sections, which automatically collapses/expands just like an accordion.
Floating Table Of Contents Plugin - jQuery FooNav.js
A simple yet robust jQuery table of contents plugin that automatically generates a floating, drawer-style, in-page navigation menu from headings (or any other elements) within the document.
Easy jQuery Table Of Contents Plugin - erToc
A simple and fast jQuery plugin that automatically generates a table of contents for your web page.
Automatic Table of Contents with jQuery - Autocontents.js
A super tiny jQuery plugin that automatically generates a nested table of contents for any element on a web page based on heading tags.
Best Vanilla JS Table Of Contents Plugins:
Highly Customizable Table Of Contents Generator – Tocbot
Tocbot is an easy yet highly customizable TOC (table of contents) generator created with pure JavaScript. It allows you to automatically generate an interactive in-page navigation menu from headling elements with support for scrollspy and smooth scroll.
table-of-contents.js
A really simple table of contents generator to create a hierarchical in-page navigation list from heading elements found within the document.
Generating A Table Of Contents with Pure JavaScript – TOC
TOC is a jQuery-free JavaScript plugin that automatically generates a table of contents from HTML heading tags of your long content.
Collapsible Side Table Of Contents In JavaScript – DocumentOutline
A table of contents JavaScript library specially designed for documentation websites.
Generate A Hierarchical Table Of Contents With Vanilla JS – toc-plugin
A vanilla JavaScript TOC plugin used to generate a list based hierarchical table of contents for long web content.
More Resources:
Seeking more jQuery plugins or JavaScript libraries to create awesome Table Of Contents on the web & mobile? See jQuery Table Of Contents and JavaScript Table Of Contents sections for more details.