Google Docs tasks · Navigation
Create a table of contents in Google Docs and keep it updated
A long document without a table of contents makes readers scroll and guess. In Google Docs the table builds itself from your headings, links every entry to its section, and refreshes on demand — the only real work is styling headings properly, which pays off across the whole document. This guide does it in order: headings first, then the table, then keeping it current.
Style your headings first
A table of contents in Google Docs is built from heading styles — not from text that merely looks big or bold. Google states the same basis in Add a title, heading, or table of contents in a document: each item in the table of contents links to a heading in the document. Five minutes on headings is what makes the table accurate.
- Apply Heading 1 to each main section title. Click in the title, then use the style box in the toolbar (it usually says Normal text) and choose Heading 1 — or Format > Paragraph styles > Heading 1 > Apply Heading 1.
- Apply Heading 2 and Heading 3 to subsections. Use Heading 2 for sections inside a main section and Heading 3 inside those. The levels become the indentation in the table of contents, so keep the hierarchy honest: no Heading 3 directly under a Heading 1 unless there is genuinely a level missing.
- Leave body text as Normal text. Paragraphs styled as headings appear in the table, so if a stray line shows up later, its style — not the table — is the thing to fix.
Insert the table of contents
- Click where the table belongs. Usually on its own page after the title page, or directly under the document title for a short document. Add a page break (Insert > Break > Page break) after the spot if the body should start on a fresh page.
- Open Insert > Page elements > Table of contents. In the Insert menu, point to Page elements, then Table of contents.
- Choose a style. Pick the look offered: a plain list with page numbers, a dotted-leader list running to page numbers, or a list of blue links without page numbers. Documents that will be printed want page numbers; documents read on screen work well with links alone. The table appears at your cursor, one entry per heading, in document order.
You can also insert the table before the document is written: Docs shows a placeholder, and the entries fill in once headings exist and the table is refreshed.
Keep it updated as you edit
The table does not update itself while you type. After adding, renaming, moving or deleting headings — and always once more before you share or print — refresh it.
- Click the table of contents. Click anywhere in it. A small toolbar appears beside it.
- Select Refresh. Click the Refresh icon (a circular arrow), or right-click the table and choose Update table of contents. Entries, order and page numbers rebuild from the current headings.
- Spot-check two entries. Click one entry near the start and one near the end: each should jump to its heading, and the page numbers should match where the headings actually fall.
Change which headings show and how it looks
Click the table, then the More table of contents options button beside it, then More options: a panel opens on the right. There you can change the format, adjust the indent for each heading level, and choose which heading levels the table displays — showing only Heading 1 and Heading 2 keeps a long document's table to one readable page. Formatting the table's text itself — font and size — is done by selecting its entries and using the normal text controls. Note that in a document in pageless format the table's formatting options are limited, and a table without page numbers suits that format better.
Remove a table of contents
Right-click the table and choose Delete table of contents. Only the table is removed; the headings in the document are untouched, so you can insert a fresh table at any time and it rebuilds from the same headings.
End state
- Every main section and subsection appears in the table, in order, at the right indent level — and nothing else appears.
- Page numbers (if your style shows them) match the pages the headings are actually on, after a final refresh.
- Clicking an entry jumps to its heading.
When it goes wrong
- The table comes out empty. The document has no heading styles yet — titles typed in a large or bold font do not count. Apply Heading 1, 2 or 3 to the section titles, then refresh the table.
- An entry is missing after editing. The table has not been refreshed since the heading changed, or the new title is not styled as a heading. Fix the style if needed, then click the table and select Refresh.
- A random line of body text appears in the table. That line carries a heading style by accident. Click in it, set its style back to Normal text, and refresh.
- Page numbers look wrong in a shared copy. Refresh once more in pages format before sharing — and remember a pageless copy has no fixed pages, so a links-only style is the honest choice there.
Related document tasks
-
Create a Google Docs document from a table pasted out of a PDF
Create a Google Docs document from a table pasted out of a PDF: try the direct paste, clean up what lands in one column, rebuild the table properly with Insert Table, or open the PDF with Google Docs when the table is large.
-
Create a Google Docs document from a phone scan
A sheet of paper on the desk can become text you can edit, search and share in a few minutes — no retyping.
-
Create a table of contents in Word that updates itself
Style the headings, insert an automatic table of contents, and update it after edits so page numbers stay right.
-
Make a Google Docs table repeat its header row on every page
Make a Google Docs table repeat its header row on every page: pin the top row in Table properties so the column labels follow the table across page breaks, and fix the tables that still split badly.
Sources
- Google Docs Editors Help, Add a title, heading, or table of contents in a document — building a table of contents from headings, inserting it from Insert > Page elements, editing and refreshing it, choosing which headings display, and deleting it.
- Google Docs Editors Help, Use headers, footers, page numbers & footnotes — page breaks and the pages format that page numbers in a table of contents rely on.