Tested tool guide
Tested browser tools
Checked August 16, 2026
What Table of Contents Generator does, with a checked example
Paste HTML that contains headings and this tool returns a ready-to-use table of contents: a nested list that mirrors the document's h1-h6 outline, where each entry links to its heading's id anchor and can carry a decimal number (1.1, 1.2.1). It runs entirely in the browser, so nothing you paste is sent to a server. The thing most people get wrong: the links only work in a page whose headings actually have the id attributes the entries point to, and the TOC only covers the headings in the snippet you paste, not the whole file.
Worked example
A concrete input and expected output from the current implementation.
Input
<h1 id="introduction">Introduction</h1>
<h2 id="install">Installation</h2>
<h2 id="usage">Usage</h2>
<h3 id="config">Configuration</h3>
<h1 id="reference">Reference</h1>
<h2 id="options">Options</h2>
->
Expected output
<ul>
<li><a href="#introduction">1. Introduction</a>
<ul>
<li><a href="#install">1.1 Installation</a></li>
<li><a href="#usage">1.2 Usage</a>
<ul>
<li><a href="#config">1.2.1 Configuration</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#reference">2. Reference</a>
<ul>
<li><a href="#options">2.1 Options</a></li>
</ul>
</li>
</ul> The tool walks the pasted headings in document order, nesting each one under the nearest preceding heading of a shallower level, and assigns decimal numbers by position: 1, then 1.1 and 1.2, with the h3 under "Usage" becoming 1.2.1. Each link points to its heading's id attribute, which is why the sample headings carry ids.