How to Fix Word Showing Page Field Codes Instead of Numbers
Question details
The user's Word documents are displaying raw field codes, such as {PAGE \* MERGEFORMAT}, instead of the calculated page numbers.
- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Viewing or editing new and existing documents that contain page numbers.
- Observed behavior
- The document shows the underlying field code text rather than the actual page numbers.
Check your keyboard layout, as many laptops require you to hold the Fn key to activate standard Function (F1-F12) keys during shortcuts.
Toggle Field Codes Using a Keyboard Shortcut
The quickest way to resolve this issue is by using Word's built-in keyboard shortcut to toggle off the field code display.
Microsoft Word has a toggle feature that switches the view between the actual field values (like page numbers) and their underlying programming codes. Accidental keystrokes often trigger this mode.
Open the Word document where the {PAGE \* MERGEFORMAT} codes are currently visible.
Press Alt + F9 on your keyboard. If you are using a laptop or a compact keyboard, press Fn + Alt + F9.
Check the header or footer of your document to ensure the field codes have reverted to standard page numbers.
Disable Field Codes in Word Options
If the keyboard shortcut does not work or your keyboard limits function keys, you can manually disable the field code display in the Word Options menu.
Edit Word Documents Seamlessly with WPS Office
If you are tired of confusing settings and accidental keystrokes in Microsoft Word, try WPS Office. It is a free, lightweight, and highly compatible alternative that makes formatting and page numbering effortless.
- 1. Download and install: Get WPS Office for free from the official website and complete the quick installation.
- 2. Open your document: Open your existing .docx files directly in WPS Writer; no conversion is needed.
- 3. Manage page numbers easily: Navigate to the Insert tab to add or adjust page numbers effortlessly without dealing with complex field codes.

Frequently Asked Questions
Why did my Word document suddenly start showing field codes?
This usually happens if you accidentally press the Alt + F9 shortcut, which is the built-in command to toggle the display of field codes instead of their values across the entire document.
Does showing field codes affect how the document prints?
Yes, if the field codes are visible on your screen, they may also print that way depending on your print settings. Toggling them off using Alt + F9 before printing resolves this.
Can I hide field codes for just one specific page number?
The Alt + F9 shortcut applies to the entire document. If you only want to toggle a single specific field code, select that specific code and press Shift + F9 instead.




