To make documents easier to use and give them a more polished look, use the Insert tab in Word Online to add page numbers to headers or footers.
If you’re not already in Editing View, click Edit Document > Edit in Word Online.
Click Insert > Header & Footer to open the header and footer areas of your document.
Click Page Numbers and then, in the gallery, click the page number location you want, such as the upper left corner.
Don’t worry if there’s already some header or footer text in the same area. Word Online places the page number next to that text.
Tip: If you want to show the total number of pages too, such as page 3 of 10, check the Include Page Count box.
To see how the document will look, click View > Reading View.
More about headers and footers
The key to working with page numbers in Word Online is to remember that they’re part of the header or footer. That means you can show different page number formats on odd and even pages, hide the number on the first page, etc. Here’s more info about what you can do.