Field codes are instructions that Word uses to create items such as page numbers, dates, cross-references, and table of contents entries. Showing the codes lets you inspect or edit those instructions instead of seeing only their finished results. You do not need special software, but the full display controls are available in the Word desktop app; Word for the web may not offer the same options. The steps below cover Windows and Mac, plus what to try if a shortcut behaves differently on your keyboard.
What You’ll Need
- A document that contains at least one field. Common examples include page numbers, an automatically generated date, or a table of contents.
- The Word desktop app on Windows or Mac for the most reliable access to the display settings. Menu names can vary slightly between versions.
- A keyboard, if you want to use the shortcut. On some laptops, the function keys also control brightness or volume, so you may need to hold Fn.
Step-by-Step
- Open the document in Word. If you are viewing it in a browser, choose the option to open it in the desktop app if available. Field codes are easiest to inspect there. Save a copy first if you plan to edit the instructions; simply changing their display does not require a copy, but editing a code can change the document’s output.
- Try the shortcut to show or hide codes throughout the document. In Word for Windows, press Alt+F9. In Word for Mac, press Option+F9. These shortcuts switch between field instructions and their displayed results across the document. If your Mac or laptop uses the function row for hardware controls, try holding Fn as well. Press the shortcut again to return to the normal results view.
- Check that the display changed. A page number field, for example, may appear as a code resembling
{ PAGE }rather than as a number. A date field might show an instruction beginning with{ DATE }. The braces and words are part of the field display, not an error message. If the document has no fields, the shortcut may appear to do nothing. - Use the Windows setting if you want a persistent display preference. Select File > Options > Advanced. Scroll to Show document content, then select Show field codes instead of their values. Choose OK. Clear that checkbox later to show field results again. This setting is useful when you regularly inspect fields and prefer not to toggle them each time.
- Find the equivalent display preference on Mac. Open Word’s Settings or Preferences from the Word menu, depending on your version. Look under View for a Field codes option, then turn it on or off. The wording and location can differ between releases, so use Word’s settings search if your version provides one. This preference changes what is displayed; it does not convert the fields into ordinary text.
- Show the code for just one field. Click inside the field, or select the field if needed, and press Shift+F9. This toggles the selected field between its code and result without switching every field in the document. On some keyboards, add Fn to the shortcut. If the selection contains more than one field, Word may toggle the selected fields together.
- Return to results and update only when appropriate. Use the all-fields shortcut again, or the single-field shortcut, to show results. If a result is out of date, select that field and press F9 to update it. Updating is a separate action from showing codes: it can change a displayed value, while toggling the view only changes whether you see the instruction or the result.
When inspecting a code, read its parts before changing anything. For example, a page number field can include a formatting switch, and a date field can include a format instruction. You can edit the text inside the field code when you understand what the instruction does, then update the field to see the result. Do not type replacement braces around ordinary text and expect Word to create a field: field braces are special characters Word inserts when creating fields.
Common Mistakes
Confusing a field with plain text. A number that looks like a page number may be a field, but someone may also have typed the number manually. Toggling field codes only affects actual fields. Click the item and try the single-field shortcut; if no code appears, it may not be a field, or the selection may not be inside it.
Using the wrong shortcut for the platform. Alt+F9 is the Windows shortcut for toggling all field codes, while Option+F9 is commonly used in Word for Mac. The same key combination may behave differently in another app or when a laptop assigns extra functions to its F keys. Check the platform-specific instructions rather than repeatedly pressing an unrelated shortcut.
Expecting the shortcut to update a value. Showing a code does not refresh it. If a cross-reference or date looks old, switch back to the result and update the field separately. Conversely, updating a field will not make its code visible if Word is still set to show results.
Typing braces yourself. The braces around a field code are special field delimiters. Typing ordinary left and right braces from the keyboard creates characters, not a working field. Create a field through Word’s Insert controls or the appropriate field command instead.
Thinking the document has been damaged. Codes can look unfamiliar when first displayed, but the view toggle does not by itself remove the fields. Avoid deleting a code just to make the page look normal; toggle back to results instead. If you accidentally edit or delete content, use Undo promptly or reopen the saved copy.
Tips
Use the single-field toggle when you only need to investigate one item, such as a page number in a header or a cross-reference in a paragraph. It keeps the rest of the page readable and makes it easier to compare that field’s code with its result. Click in the field itself rather than nearby text; headers, footers, and text boxes can require an extra click to activate the correct area.
For a document-wide inspection, toggle all codes on, then scan for fields that matter to your task. Common field names include PAGE for a page number, NUMPAGES for the total page count, DATE for a date, and REF for a cross-reference. The code may include additional text that controls formatting or identifies a source. Do not remove those extra parts unless you know what they do.
If you are preparing a document for someone else, switch back to field results before handing it over unless they specifically need to inspect the codes. The display preference may be local to your Word setup, but checking the document’s appearance avoids confusion. Use Print Preview to confirm what the pages look like before printing or exporting. For a table of contents, update it using Word’s table of contents controls rather than trying to edit its generated entries one by one.
Keep in mind that field codes and field results serve different purposes. A result is what readers usually see; the code tells Word how to produce or retrieve that result. A page number field can update as pages move, while a manually typed number cannot. When you need a fixed piece of text rather than an automatically changing value, decide deliberately whether to keep the field or replace it with text.
Troubleshooting
The shortcut does nothing: First confirm you are in the desktop app and that the document contains fields. Then try the correct shortcut for Windows or Mac and include Fn if your keyboard requires it. If keyboard shortcuts are customized or intercepted by another utility, use the display preference in Word’s settings instead.
Only one code changes: You may have used Shift+F9, which toggles the selected field, rather than the all-fields shortcut. Use Alt+F9 on Windows or Option+F9 on Mac to switch all fields. If you intended to change just one, make sure the cursor is inside the desired field before using Shift+F9.
Codes appear in one document but not another: The documents may contain different kinds of content, or one item may be plain text rather than a field. Test a known page number or date field. A document can also contain fields in headers, footers, or text boxes that are not obvious in the main body; inspect those areas directly.
The code appears but the result is still wrong: Switch back to results and update the specific field with F9. Some fields depend on surrounding document content or settings, so updating may not produce the value you expect if the source is missing or incorrect. For a table of contents, use its update command and choose whether to update page numbers or the entire table, as appropriate.
The menu option is missing: Check that you are using the desktop version of Word and look for the equivalent setting under Advanced or View. Interface labels change across versions, and the web app has fewer document-display controls. If you cannot find a setting, use Word’s built-in help or settings search for “field codes.”
Frequently Asked Questions
What is the shortcut to show all field codes in Word?
Use Alt+F9 in Word for Windows or Option+F9 in Word for Mac. If the function keys have another assigned action, try holding Fn too.
How do I show only one field code?
Click inside the field and press Shift+F9. This toggles that field between its instruction and its displayed result; the exact selection behavior can depend on what is selected.
Does showing field codes change my document?
No. It changes the display from field results to field instructions, or back. Editing or deleting the code is different and can affect what the field produces.
How do I update a field after editing it?
Show the field result, select the field, and press F9. For generated content such as a table of contents, use the relevant update control so Word can refresh the appropriate entries.
Can I show field codes in Word for the web?
The web version does not provide all the same field-code controls as the desktop app. Open the document in desktop Word to use the shortcuts or display settings described above.
Why do I see braces around the code?
Those are Word’s field delimiters when it displays a field instruction. They are not ordinary braces to type manually. If you want the finished page number, date, or other value back, toggle the field display to results.