Skip to main content

Confluence Table of Contents (TOC): How to Add and Customize It

To add a table of contents (TOC) to a Confluence page, insert the Table of Contents macro. It reads the page’s headings and turns them into a clickable list of contents, so readers see the structure at a glance and jump straight to the section they need. On any page longer than two screens, it is the simplest navigation you can add.

The 10-second version: edit the page, type /table of contents, press Enter, then publish. The list builds itself from your headings and updates whenever you change them.

Insert a table of contents, publish, and click an entry to jump to that section.

This guide covers Confluence Cloud as it looks in 2026, with notes for Data Center. It also covers what the official documentation skips: the built-in floating table of contents, a collapsible table of contents, the Table of Content Zone, and the cases where links stop working.

How to add a table of contents (TOC) in Confluence

Option 1: the slash command (Cloud, fastest)

  1. Open the page and select Edit (or press E).
  2. Place the cursor where the list should appear, usually right after the introduction.
  3. Type /table of contents and press Enter to insert the TOC macro.
  4. The macro appears with a preview of your headings, and its settings panel opens on the right.
  5. Select Publish or Update.

In the German interface, the macro is called Inhaltsverzeichnis: type /inhaltsverzeichnis.

Option 2: the editor toolbar (Cloud)

  1. Select Insert elements (the + button) in the editor toolbar.
  2. Search for table of contents and select it.

Option 3: Data Center (menu, autocomplete or wiki markup)

  1. Select Insert > Other macros in the editor toolbar.
  2. Search for Table of Contents, adjust the parameters and select Insert.

You can also type {toc in the Data Center editor and pick the macro from the suggestions. In Confluence wiki markup the macro is {toc}, which is handy wherever Data Center accepts wiki markup, for example in the space sidebar, header or footer (see the copy-ready blocks below).

Before you insert: use real headings

The macro only lists text formatted as a heading (Heading 1 to 6). Bold paragraphs that merely look like headings do not count. If your table of contents comes out empty or patchy, check the formatting first: select the line and choose a heading level from the Normal text dropdown.

Table of Contents (TOC) macro settings

Select the macro in the editor to open its settings. Changes appear in the preview immediately.

Basic

Setting What it does Default
Display as Vertical list (classic table of contents) or Horizontal list (a row of links, useful as a menu bar) Vertical list
Bullet style None, Bullet, Circle, Square, Mixed or Numbered (vertical lists only) None in the current Cloud editor
Include heading levels from … to Which heading levels appear. Set from 2 to 3 to skip the page’s H1 and hide fine-grained H4–H6 sections 1 to 6
Include section numbers Adds outline numbering (1, 1.1, 1.2 …) to the entries Off

Advanced

Setting What it does
Indent headings Indent per heading level, as a CSS value such as 10px
Include headings with Only list headings that match. Separate keywords with |, or use a regular expression
Exclude headings with Hide matching headings, for example Changelog|Appendix
CSS class name Wraps the list in a div with this class, for custom styling
Exclude PDF export Leaves the table of contents out of PDF exports and printouts

Two settings solve most problems in practice. Heading levels 2 to 3 keep the list short on long pages. Exclude headings with removes sections such as “Related pages” or “Changelog” that readers do not need in the list.

The built-in floating table of contents (Cloud)

Confluence Cloud now has a second, automatic table of contents that you do not have to insert. On a published page with headings, a Table of contents button appears in the small toolbar on the right edge of the page. Click it, and a floating panel lists every heading. The section you are currently reading is highlighted.

The floating table of contents opens from the right-hand toolbar on any published page with headings.

What this means for your pages:

  • Readers get navigation even without the macro. For an internal page that only you and your team read, the floating panel is often enough.
  • The macro still matters when the list should be visible without a click, sit in a specific place, show only some heading levels, or appear in PDF exports.
  • The floating panel is a Cloud feature. In Data Center, use the macro.

Collapsible table of contents

Long tables of contents push the actual content down the page. Confluence has no “collapse” option in the macro, but you can combine it with an expand:

  1. Insert an expand with /expand and title it, for example, Contents.
  2. Click inside the expand and insert the table of contents with /table of contents.
  3. Publish. Readers see a single line and open the list when they need it.

A table of contents inside an expand: one line when collapsed, the full list when opened.

The links inside the collapsed list work as usual once it is opened. The reverse case is different: headings that sit inside a collapsed expand appear in the list, but clicking them does not take the reader there until that expand is opened. More on collapsible sections in our guide to the Expand macro.

Table of Content Zone: a TOC for one section

The Table of Content Zone macro is a separate macro that you will find next to the regular one in the slash menu (/table of content zone). Instead of listing every heading on the page, it lists only the headings inside its own body. Use it when a long page has one section that needs its own small table of contents, for example a reference chapter with many subsections, without cluttering the main list.

Put the section’s content inside the zone macro, and the macro builds the list for exactly that part of the page.

Linking to a section from outside the page

Each heading on a published page has its own anchor. Clicking a table of contents entry adds it to the address, for example …/New+Employee+Handbook#First-week. Copy that address to send someone straight to a section. For simple headings, the anchor is the heading text with spaces replaced by hyphens, so it changes when you rename the heading.

When the table of contents does not work as expected

Problem Cause What to do
The list is empty or misses sections The “headings” are bold text, not heading styles Format them as Heading 1–6
Too many entries All six heading levels are included Set heading levels to 2–3 or exclude headings by keyword
A link does nothing The heading sits inside a collapsed expand Move the heading out of the expand, or open the expand first
The table of contents inside an excerpt shows the wrong headings Inside an excerpt, the macro lists only the excerpt’s own headings, and the links do not lead back to the source page Place the table of contents outside the excerpt
Nothing shows in a page template The macro does not render inside the template itself It works on pages created from the template, after the first save
The list appears in PDF exports That is the default Turn on Exclude PDF export in Advanced settings

Built-in options at a glance

For a single page, the built-in options cover almost everything:

You want to… Built in? How
List all headings with links Yes Table of Contents macro
Navigation that highlights where the reader is Yes (Cloud) Floating table of contents in the right-hand toolbar
Collapsible table of contents Yes Table of contents inside an expand
Table of contents for one section Yes Table of Content Zone
Numbered sections Yes Include section numbers
Table of contents across several pages No Use the page tree or a children display instead

Your sections are mostly big tables? On reference pages, the table of contents gets readers to the right section, and then they still have to scroll through a long table to find one row. Fast Inline Table Editing + Excel Formulas for Confluence adds what Confluence lacks on the published page: readers filter a long table down to the rows they need, and anyone with edit rights can change cells without opening the editor. The table of contents takes them to the right table, and filtering takes them to the right row.

Copy-ready blocks

Slash command (Cloud editor)

/table of contents      (English interface)
/inhaltsverzeichnis     (German interface)

Confluence wiki markup (Data Center)

{toc:minLevel=2|maxLevel=3|style=none|exclude=Changelog}

Storage format (Data Center, REST API, templates)

<ac:structured-macro ac:name="toc">
  <ac:parameter ac:name="minLevel">2</ac:parameter>
  <ac:parameter ac:name="maxLevel">3</ac:parameter>
  <ac:parameter ac:name="style">none</ac:parameter>
</ac:structured-macro>

Atlassian Document Format (Cloud REST API v2)

{
  "type": "extension",
  "attrs": {
    "extensionType": "com.atlassian.confluence.macro.core",
    "extensionKey": "toc",
    "parameters": {
      "macroParams": {
        "minLevel": { "value": "2" },
        "maxLevel": { "value": "3" },
        "style": { "value": "none" }
      }
    }
  }
}

FAQ

How do I add a table of contents (TOC) in Confluence?

Insert the Table of Contents macro: edit the page, type /table of contents where the list should appear, press Enter and publish. Confluence builds the list from the headings on the page and keeps it up to date.

Why is my Confluence table of contents empty?

The macro only lists text formatted as headings (Heading 1–6). Bold paragraphs are ignored. Apply a heading style to your section titles, and the entries appear.

How do I make a collapsible table of contents in Confluence?

Insert an expand, title it “Contents” and put the Table of Contents macro inside it. The list stays collapsed until a reader opens it.

What is the Table of Content Zone macro?

A variant that lists only the headings inside its own body. It gives one section of a long page its own table of contents without changing the main one.

Does Confluence Cloud have a floating table of contents?

Yes. On published pages with headings, a Table of contents button in the right-hand toolbar opens a floating list of all headings and highlights the current section. In Data Center, use the macro instead.

How do I show only some heading levels in the TOC?

In the macro settings, set “Include heading levels from … to”, for example from 2 to 3. In Advanced settings you can also exclude headings by keyword.

Can I number the entries?

Yes. Turn on “Include section numbers” in the Basic settings to get outline numbering such as 1, 1.1 and 1.2.

Why does clicking an entry not jump to the section?

Most often the heading is inside a collapsed expand. Open the expand first, or move the heading outside it.

How do I link to a specific section of a Confluence page?

Click the section in the table of contents and copy the address. It ends with the heading as an anchor, for example #First-week.

Does the table of contents appear in PDF exports?

Yes, by default. To leave it out, turn on “Exclude PDF export” in the Advanced settings.


Discover our Apps for Jira and Confluence