Formatting Issues

How to Center a Word Table of Contents and Remove Page Numbers

Steven ParkerSteven Parker Nov 4, 2026 873 views

Question details

The user wants to format a Word document's Table of Contents (TOC) so that all heading levels are centered and the page numbers are hidden, ensuring these settings persist even after the TOC is updated.

How to Center Word Table of Contents Entries and Remove Page Numbers
Product
Word Processor
Device & OS
not provided
Scenario
Customizing the appearance of a Table of Contents for specific document formatting and layout requirements.
Observed behavior
By default, TOC entries are left-aligned and include page numbers. Manual centering is lost when the TOC updates, requiring a permanent style modification.
Before you start

Before making changes to your Table of Contents, ensure your document headings are properly structured using the built-in Heading 1, Heading 2, and Heading 3 styles so the TOC generates accurately.

Solution 1Recommended

Modify Field Codes and Update TOC Styles

The most reliable way to hide page numbers and center text permanently is by editing the TOC field code and updating the default TOC paragraph styles.

Table of Contents formatting is governed by field codes and specialized paragraph styles (TOC 1, TOC 2, etc.). Editing these ensures your changes are not overwritten when the table refreshes.

1
Reveal Field Codes

Press Alt + F9 on your keyboard to reveal the underlying field codes in your document.

2
Suppress Page Numbers

Locate the TOC field code (e.g., { TOC \o "1-3" \h \z \u }). Inside the closing brace, add the \n switch to suppress page numbers. Then, press Alt + F9 again to hide the codes.

3
Modify TOC Paragraph Alignment

Open the Styles pane. Find the 'TOC 1' style, right-click it, and select 'Modify'. Under the Formatting options, click the 'Center' alignment button and apply the changes. Repeat this for 'TOC 2' through 'TOC 9' if needed.

4
Update the Table

Right-click your Table of Contents and select 'Update Field' to apply and verify your new formatting.

Modify Field Codes and Update TOC Styles
Automatic Style Updates: Because TOC styles are usually set to update automatically, simply selecting a Level 1 entry in the document and centering it may automatically update the TOC 1 style for the entire table.
Advanced Document Formatting

Easily Customize Table of Contents Formatting in WPS Writer

WPS Writer provides an intuitive interface for inserting and customizing a Table of Contents. You can easily modify TOC styles, hide page numbers, and center your entries to meet your document's specific layout needs without dealing with complex field codes.

  1. 1. Insert a Table of Contents: Open your document in WPS Writer, navigate to the 'References' tab, and click 'Table of Contents' to select a layout.
  2. 2. Disable Page Numbers: Select 'Insert Table of Contents' to open the advanced settings. Uncheck the 'Show page numbers' option to hide them instantly.
  3. 3. Modify TOC Alignment: In the same settings window, click 'Modify' to select and change the paragraph styles for each TOC level, setting the alignment to Center before clicking OK.
Fully compatible with Microsoft Word documents and TOC field codes.Intuitive Reference tab for quick TOC generation and formatting.Easily modify built-in TOC styles via visual dialogue boxes.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Table of Contents lose its centered alignment when I update it?

This happens because the TOC reverts to its default paragraph styles whenever it is updated. To fix this permanently, you must modify the underlying 'TOC 1', 'TOC 2', etc., styles via the Styles pane instead of just highlighting the text and centering it directly.

What does the \n switch do in a TOC field code?

The \n switch tells the word processor to omit page numbers from the generated Table of Contents. It applies to all heading levels unless specifically restricted by a number range.

Can I hide page numbers for only specific heading levels?

Yes, you can hide page numbers for specific levels by adding the level range to the switch. For example, adding '\n 1-1' inside the field code will suppress page numbers only for Level 1 headings while keeping them for other levels.