When you insert a table of contents in Word, every entry automatically gets a page number. For some documents, you may want the page number to appear only for top-level headings and not for subheadings. This is common in legal briefs, technical manuals, or academic papers where the TOC shows chapter numbers but hides page references for sections like “Appendix.”
The default TOC settings in Word apply page numbers uniformly to all levels. However, you can customize each TOC level individually using the Modify Style dialog or the TOC field switches. This article shows you how to remove page numbers from specific TOC levels without affecting the rest of the table.
You will learn two methods: modifying the TOC style for a single level and editing the TOC field code to exclude page numbers from chosen levels. Both approaches work in Word for Microsoft 365, Word 2021, Word 2019, and earlier versions.
Key Takeaways: Customizing Page Numbers in a Table of Contents
- References > Table of Contents > Custom Table of Contents > Modify: Opens the style settings for each TOC level where you can remove the page number format.
- TOC field switch \n: Adding \n followed by a level number tells Word to omit page numbers from that level and all deeper levels.
- Ctrl + Shift + F9 to unlink the TOC field: Permanently converts the TOC to plain text, allowing manual removal of page numbers for specific entries.
Why Word Adds Page Numbers to All TOC Levels
A table of contents in Word is a field code. When you insert a TOC, Word scans the document for headings formatted with built-in heading styles (Heading 1, Heading 2, Heading 3, and so on). By default, the TOC field includes the \h switch (hyperlinks) and the \u switch (use outline levels), and it always adds page numbers to every entry unless you tell it otherwise.
The page number behavior is controlled by the TOC level styles. Each heading level corresponds to a TOC style: TOC 1 for Heading 1, TOC 2 for Heading 2, and so on. The page number is part of the paragraph formatting inside that style. If you remove the tab leader and page number from a TOC style, entries at that level will show only the heading text.
There is no built-in checkbox labeled “Hide page numbers for level 3.” You must either edit the TOC style or modify the field code directly. Both methods give you full control over which levels display page numbers.
Method 1: Modify the TOC Style to Remove Page Numbers
This method changes the paragraph format of a specific TOC level. It works best when you want to hide page numbers from one or two levels permanently. After you modify the style, any future TOC updates will keep your custom settings.
- Open the Table of Contents dialog
Go to the References tab and click Table of Contents. At the bottom of the menu, choose Custom Table of Contents. - Click Modify
In the Table of Contents dialog, click the Modify button. This opens the Style dialog where you see a list of TOC levels. - Select the TOC level to change
Highlight the level you want to modify. For example, select TOC 2 if you want to hide page numbers for Heading 2 entries. Then click Modify. - Open the Format menu and choose Tabs
In the Modify Style dialog, click the Format button in the bottom-left corner and select Tabs. - Remove the right-aligned tab stop
In the Tabs dialog, you will see a tab stop position (usually at the right margin) with a right alignment and a leader style. Select that tab stop and click Clear. This removes the page number and the dotted leader line from the TOC level. - Apply the change
Click OK in the Tabs dialog, then OK in the Modify Style dialog, and finally OK in the Table of Contents dialog. Word asks if you want to replace the selected table of contents. Click Yes.
After this change, all entries at the modified TOC level will appear without a page number. The other levels remain unchanged. If you update the TOC later, the same style applies automatically.
Method 2: Use the TOC Field Switch \n to Exclude Pages by Level
The \n switch in a TOC field code tells Word to omit page numbers starting from a specific level. For example, \n 2 hides page numbers for level 2 and all deeper levels. This method is faster than modifying styles and does not affect the TOC style definitions.
- Display the field code
Click inside the existing TOC to select it. Press Alt + F9 (or Shift + F9 on some keyboards) to show the field code. It looks like{ TOC \o "1-3" \h \z \u }. - Add the \n switch
Type a space after the last switch and then add\n 2if you want to hide page numbers for level 2 and below. For level 3 only, use\n 3. The field code becomes{ TOC \o "1-3" \h \z \u \n 2 }. - Update the TOC
Press Alt + F9 again to hide the field code. Right-click the TOC and select Update Field, then choose Update entire table.
The page numbers disappear from the specified level and all deeper levels. If you later need page numbers back, edit the field code again and remove the \n switch.
Method 3: Unlink the TOC and Manually Delete Page Numbers
This approach gives you full manual control. You convert the TOC to static text and then delete page numbers from individual entries. Use this method only when you do not plan to update the TOC again, because unlinking breaks the connection to the document headings.
- Select the entire TOC
Click anywhere inside the TOC. Press Ctrl + Shift + F9. This unlinks the field and turns the TOC into plain text. - Delete page numbers manually
Click at the end of a heading entry and press Backspace to remove the tab character and the page number. Repeat for each entry at the level you want to hide. - Apply consistent formatting
Select all entries at the same level and use the Home tab to apply the same font and indentation so the TOC looks uniform.
Because the TOC is no longer a field, you cannot update it automatically. If you change headings or page numbers later, you must rebuild the TOC from scratch.
Common Issues When Hiding Page Numbers in a TOC
Page numbers reappear after updating the TOC
If you manually removed page numbers by editing the TOC style and then updated the table, the page numbers may come back. This happens if you did not save the style modification correctly. After modifying the TOC style, always click OK in every dialog and choose Yes when asked to replace the existing TOC. To verify, select the TOC, press Alt + F9, and check that the field code does not contain conflicting switches like \p (which forces page numbers).
The \n switch hides too many levels
The \n switch applies to the specified level and all deeper levels. For example, \n 2 hides page numbers for level 2, 3, 4, and so on. If you want to hide page numbers for only level 3 but keep them for level 2, you cannot use the \n switch alone. In that case, use Method 1 (modify the TOC 3 style) or Method 3 (unlink and delete manually).
Page numbers still appear in the PDF or print preview
If the TOC looks correct on screen but page numbers show up when you print or export to PDF, the issue is usually a printer driver or display glitch. First, update the TOC by right-clicking and selecting Update Field. If the problem persists, try Method 1 again, making sure you cleared the right-aligned tab stop in the TOC style. Also check that the TOC field code does not have a \p switch, which forces page numbers for all levels.
Comparison: Methods to Hide Page Numbers in a TOC
| Item | Modify TOC Style | TOC Field Switch \n | Unlink and Edit Manually |
|---|---|---|---|
| Levels affected | Single level only | Specified level and all deeper levels | Any level, entry by entry |
| Permanent or reversible | Permanent until style is changed back | Reversible by removing the switch | Permanent once unlinked |
| Works after TOC update | Yes | Yes | No, TOC must be recreated |
| Best for | Hiding page numbers for one specific level | Hiding page numbers for multiple levels at once | One-time document where no future updates are needed |
You can now hide page numbers from specific TOC levels using any of the three methods. Start with the TOC field switch \n if you want a quick, reversible change. Use the Modify Style method for permanent control over one or two levels. The unlink method is a last resort for static documents. To further customize your TOC, explore the \b switch to build a TOC from only a specific section of the document.