A table of contents is a list at the start of your document that shows readers where to find each section

Most document editors — whether you chose Word, Google Docs, LibreOffice, or something else — can build a table of contents automatically. You do not type it by hand. Instead, you mark your section headings with the editor's heading styles, and the software generates the list and updates it whenever you add, delete, or rename a section. This saves time and keeps your table of contents accurate even if you move sections around or change their names later.

The process is nearly identical across editors, though the menu names and button locations differ slightly. The core idea stays the same: format your headings first, then insert the table of contents where you want it to appear.

Key Takeaways

  • You must use your editor's heading styles (Heading 1, Heading 2, and so on) for the table of contents to work — regular bold text will not be included.
  • The table of contents pulls directly from your headings, so if you change a heading name, the table updates automatically.
  • Most editors let you choose how many heading levels to include, so you can show only top-level sections or drill down to sub-sections.
  • You should insert the table of contents after your title page or introduction, and leave space for it to grow if you plan to add more sections later.

How to format your headings before you build the table of contents

Open your document and look at the text you want to appear in the table of contents. These are usually your section titles — the main topics that break up your document into chunks. Select the first section title by clicking and dragging across it or triple-clicking the line.

In Word, click the Home tab, then find the Styles section on the ribbon. You will see boxes labeled Heading 1, Heading 2, Heading 3, and so on. Click Heading 1 for your main section titles. In Google Docs, click the Format menu, then Paragraph Styles, then Normal, and choose Heading 1 from the dropdown. In LibreOffice Writer, click Format, then Paragraph, and select Heading 1 from the Style list. Repeat this for every section title in your document, using Heading 1 for the largest sections, Heading 2 for subsections under those, and Heading 3 if you have sub-subsections.

Do not skip this step or try to make headings by making text bold and larger. The table of contents software looks for the heading style, not the appearance. If you use bold instead of a heading style, that text will not show up in your table of contents.

Inserting the table of contents in Word

Place your cursor where you want the table of contents to appear — usually on a blank page right after your title or introduction. Click the References tab on the ribbon. You will see a button labeled Table of Contents. Click it and choose a style from the dropdown menu. Word will insert a formatted list of all your headings, with page numbers next to each one.

If you later change a heading name, add a new section, or move sections around, right-click on the table of contents and select Update Field. A dialog box will ask whether you want to update page numbers only or the entire table. Choose Update Entire Table to catch any heading changes. Word will refresh the list in seconds.

Inserting the table of contents in Google Docs

Click where you want the table of contents to go. Click the Insert menu, then Table of Contents. Google Docs will show you three style options — choose the one you prefer. Google Docs will scan your document for all headings and create the list automatically, with clickable links that jump to each section when you click them.

Google Docs updates the table of contents in real time as you edit. If you rename a heading or add a new one, the table updates on its own without you having to do anything. If it does not update when ready, refresh your browser or close and reopen the document.

Inserting the table of contents in LibreOffice Writer

Click where you want the table of contents to appear. Click the Insert menu, then Table of Contents and Index, then Table of Contents. A dialog box will open with options for how many heading levels to include and what style to use. The default settings usually work fine — they will include Heading 1, Heading 2, and Heading 3 if you have them. Click OK.

LibreOffice inserts the table of contents as a separate object. If you change headings later, right-click on the table of contents and select Update Index. LibreOffice will refresh the list to match your current headings and page numbers.

Choosing how many heading levels to show

A table of contents does not have to show every heading level. If your document has Heading 1, Heading 2, and Heading 3, you can choose to show only Heading 1 and Heading 2, leaving out the sub-subsections. This keeps the table shorter and easier to scan.

In Word, right-click the table of contents and select Edit Field. Change the number next to "Outline Levels" to show fewer levels. In Google Docs, you cannot change this after insertion — you have to delete the table and insert a new one if you want different levels. In LibreOffice, right-click the table and select Edit Index to adjust the levels. Most readers find that showing two or three levels strikes a good balance between detail and readability.

What to do if your table of contents is blank or incomplete

A blank table of contents almost always means your section titles are not formatted with heading styles. Go back through your document and check that every section title you want in the table has been marked as Heading 1, Heading 2, or another heading style. Regular bold text, even if it looks like a heading, will not appear in the table. Once you have formatted all your headings, update the table of contents and it should populate.

If some headings appear but others do not, check that the missing ones are actually formatted as headings and not just bold. Also check whether you have set the table to show only a certain number of levels — if you set it to show only Heading 1, then Heading 2 and Heading 3 will not appear, even though they exist in your document.

Frequently Asked Questions

Can I manually edit the table of contents after it is created?

You can, but you should not. Any manual changes you make will disappear the next time you update the table. Instead, edit the actual headings in your document, then update the table. This keeps everything in sync and saves you from having to fix the table every time you make a change.

What if I want different formatting for the table of contents?

All three editors offer style options when you insert the table. In Word and LibreOffice, you can also right-click the table after insertion and choose a different style. Google Docs offers fewer formatting options, but you can manually adjust font size and color after insertion without breaking the table's functionality.

Do I need a table of contents for a short document?

A table of contents is most useful for documents longer than five or six pages, where readers benefit from knowing what sections exist and where to find them. For shorter documents, it may feel like overkill. Use your judgment based on your reader's needs.

Will the table of contents work if I share the document with someone else?

Yes. In Google Docs, the links in the table of contents remain clickable for anyone who views the document. In Word and LibreOffice, the table works in the shared file, though the page numbers may shift depending on how the other person's printer or screen displays the document.