Bhinish Dhiman· updated 5 October 2026
How to add page numbers to a PDF, starting from any page
Add the PDF to the Page numbers tool, choose a position and a format, set Start on page to the first sheet that should carry a number and First number to the figure printed there, then download. The two are independent: Start on page 2 with First number 1 leaves the cover clean and prints 1 on the second sheet. In n-of-total format the total is the last number printed, so the two always agree.
A cover that should stay clean, front matter that should not count, a chapter that has to begin at 31: page numbering goes wrong when the place stamping starts and the number printed there are treated as one setting. This tool keeps them apart, and once you see the arithmetic, every layout is two numbers.
Start page and first number
The start page is the physical sheet on which stamping begins; every sheet before it is left untouched. The first number is the figure printed on that sheet. Each later sheet gets one more, so the number on any sheet is the first number, plus that sheet’s position, minus the start page. That is the formula in addPageNumbers in src/lib/pdf/ops.ts, written out in words.
Numbering a PDF step by step
- Open Page numbers and choose Add a PDF. The pages appear as thumbnails.
- Pick a Position: top or bottom, then left, centre or right. Bottom centre is selected to begin with.
- Pick a Format: a plain number, “Page 1”, or a count such as “1 of 10”.
- Set Start on page and First number. A line under the two fields spells out which sheets stay clean and what the first stamped sheet will read.
- Check the thumbnails, which show each number roughly where it will land, then press the Page numbers button and download the copy, which has
-numberedadded to its name.
If Start on page is beyond the last sheet, the tool refuses rather than returning an unnumbered file, with a message of the form “This document has 10 pages, so numbering cannot start on page 12.”
Settings for common layouts
Every row follows the formula above. “Blank” means the sheet is left clean.
| Document | Start on page | First number | Format | Sheet 2 reads | Last sheet reads |
|---|---|---|---|---|---|
| 10 sheets, all numbered | 1 | 1 | n of total | 2 of 10 | 10 of 10 |
| 10 sheets, cover left clean | 2 | 1 | n of total | 1 of 9 | 9 of 9 |
| 10 sheets, cover clean, number matches the sheet | 2 | 2 | plain number | 2 | 10 |
| 20 sheets, three of them front matter | 4 | 1 | plain number | blank | 17 |
| 12-sheet chapter that begins at 31 | 1 | 31 | Page n | Page 32 | Page 42 |
| 10 sheets, cover clean, number matches the sheet | 2 | 2 | n of total | 2 of 10 | 10 of 10 |
The last sheet of the front-matter row is 1 + 20 − 4 = 17; the chapter ends on 31 + 12 − 1 = 42.
How the total is counted
In an n-of-total stamp, the total is the last number printed: First number + sheets − Start on page. A ten-sheet file with a clean cover and First number 1 ends on 1 + 10 − 2 = 9, so its stamps run 1 of 9 to 9 of 9 and skipping the cover does not inflate the count. With First number 2 the cover counts as page 1 and the stamps run 2 of 10 to 10 of 10. The chapter in row five, in count format, would end 42 of 42.
That last-row case is the one we got wrong. While writing this guide we found the total was counting only the numbered sheets and ignoring the first number, so the bottom row read 10 of 9. The tool now uses the formula above, the thumbnails use the same calculation as the stamp, and a test in the site’s code holds the ten-sheet case so it cannot come back.
The Format menu’s example label for the count format still shows your file’s full sheet count, ten for a ten-sheet file, as an illustration. The thumbnails show what will actually be stamped, so check those.
What gets stamped
The numbers are set in Helvetica at 10 points, in a mid grey of 40% in each colour channel (0.4 × 255 = 102, which is #666666), 28 points in from the edge of the page. That margin is just under a centimetre: 28 ÷ 72 × 25.4 = 9.9 mm. Font, size and colour have no controls. Helvetica is one of the standard PDF base fonts, which do not need embedding, so the stamp adds almost nothing to the file size.
Three limits are worth knowing before you start:
- There are no roman numerals and no prefix other than “Page”. The three formats are the whole set.
- Numbering runs to the last sheet. An appendix that should stay unnumbered has to come off first with Split PDF and go back on afterwards with Merge PDF.
- The 28 points are measured from the full page. If the file has been cropped by more than about 28 points on the numbered edge, by Crop PDF or by a scanner, the number can land in the hidden strip. The thumbnails will not show this, so open the downloaded file and look.
Other ways to number pages
Neither macOS Preview nor Windows has a built-in way to stamp page numbers that we can point you to, and none of the command-line tools we have tested for these guides adds them. This guide does not suggest a route it cannot vouch for.
Confirming the file was not uploaded
The numbers are drawn by code running in the tab. To see it, add the file, turn off your connection and press the button: the numbered copy still downloads. With the Network tab of your browser’s developer tools open, adding the first file shows the tool’s PDF code arriving, and no request afterwards carries your document out.
Number the pages
Page numbers handles the cover, the front matter and the chapter that starts mid-sequence with the same two fields. If you plan to trim margins as well, read how cropping hides rather than deletes first, so the crop and the numbers do not fight over the same strip of page.