Numbering matters more than it looks. A printed report that has been dropped is unsortable without it, a bundle sent to a court or a client needs stable references, and a reader quoting page 14 back to you needs page 14 to exist. Word processors handle this at export time, but a PDF that has already been produced, merged or scanned usually has no numbering at all.
The document is never uploaded. pdf-lib reads the bytes in the tab, measures the text with real font metrics, draws each number onto its page and saves a new file, so confidential bundles stay on your own machine and there is no queue or file size cap to work around.
Choosing a page number position that survives printing
The safest place for a number is the bottom outer corner, because that is where a reader's thumb naturally lands when flicking through a stack of paper. Bottom centre is the conventional choice for reports and academic work and is the only position that stays correct whether or not the document is printed double sided.
Avoid the very edge of the sheet. Most desktop printers cannot print within about 5 millimetres of the paper edge, and commercial printing trims a few more, so a number placed 10 points from the bottom can vanish entirely. A margin of 24 to 36 points, roughly a third to a half of an inch, is comfortable on both A4 and US Letter.
- Bottom centre for reports, dissertations and anything bound on the left.
- Bottom right for single sided documents that will be stapled in the corner.
- Top right when the foot of the page already carries a footer or legal text.
- Keep at least a 24 point margin so the number is not trimmed away.
- Match the number to the body text size, normally 9 to 11 points.
Add page numbers to PDF files without disturbing the content
The numbers are drawn as a new content stream on top of each existing page rather than by rebuilding the page. Nothing that was already there is re encoded, so the text stays selectable, images keep their original quality, links keep working and the file grows by only a few hundred bytes in total.
The one thing the tool cannot do is guess whether the spot you picked is empty. If a document already has a footer running across the bottom of every page, a number placed there will overlap it. Look at the first result, and if it collides, move the position or increase the margin and run it again on the original file.
Starting numbers, front matter and page ranges
Real documents rarely start counting at the first sheet. A cover page and a contents page usually carry no number, and the body then starts at 1 anyway. Two controls handle this: the first numbered page tells the tool where stamping begins, and the starting number tells it what to print there.
Set the first numbered page to 3 and the starting number to 1 and the cover and contents stay clean while the body reads 1, 2, 3. Set the starting number to 47 instead when the document is a continuation of an earlier volume and the numbering has to run on. Pages before the first numbered page are copied through untouched.
Formats, fonts and how the number is rendered
Three formats cover almost every requirement. A bare number suits most documents. The word Page in front of it suits informal handouts. The X of Y form, which prints the total alongside, is the one to use for anything posted or faxed, because a recipient can tell immediately whether a page is missing.
Numbers are set in Helvetica, one of the fourteen standard fonts every PDF reader is required to provide. That keeps the output portable and adds no embedded font data to the file. Each string is measured with the real font metrics before it is drawn, so centring is exact and right alignment stays flush no matter how many digits the number has.
How pdf page numbering runs entirely in the browser
pdf-lib parses the document object structure, walks the page tree and appends a small text drawing operation to each page you selected. The result is saved as a new byte array and handed to you as a download through a blob URL, which is revoked as soon as it has been used.
That architecture is why there is no upload progress bar anywhere on this page. The work happens on your processor, so a 500 page bundle finishes in about a second and nothing about it is ever transmitted. It also means the tool cannot open an encrypted document, since the browser has no password to decrypt it with, and it will tell you so rather than producing a broken file.
| Position | Best for | Watch out for |
|---|---|---|
| Bottom centre | Reports and academic work | Existing centred footers |
| Bottom right | Single sided, corner stapled | Shifts across on double sided printing |
| Bottom left | Left bound booklets | Binding margin swallowing the number |
| Top right | Documents with a busy foot | Running headers already in place |
How to number PDF pages
- 1
Add your document
Drop a .pdf file onto the drop area or click to choose one. It is read on your device and never uploaded.
- 2
Choose the position
Pick one of the six placements, then set the margin so the number clears the printable edge of the paper.
- 3
Set the counting rules
Choose the first page to stamp, the number it should show and whether to print a plain number, Page N or N of M.
- 4
Stamp and download
Press the button and download the numbered copy. Your original file on disk is left exactly as it was.
Related tools worth bookmarking
Sources and further reading
- pdf-lib documentationThe library this tool uses to draw text onto an existing page and save the modified document.pdf-lib.js.org
- ISO 32000-2, the PDF specificationDefines page content streams and the fourteen standard fonts the stamped numbers are drawn with.iso.org
- MDN: BlobThe browser object the finished document is wrapped in before it is offered to you as a download.developer.mozilla.org
Frequently asked questions
Common questions about the add page numbers to pdf.
Yes. Set the first numbered page to 2 or 3 and the earlier sheets are copied through with nothing drawn on them. The starting number is independent, so the first stamped page can still read 1 while physically being the third sheet in the file.
They can, because the tool draws on top of whatever is already there and cannot see it. If your document has a running footer, choose a top position instead or raise the margin until the number sits clear, then run the tool again on the untouched original.
Not at all. Existing content is never re encoded. A short text instruction is appended to each page, which is why the finished file is typically only a few hundred bytes larger than the one you started with and every image stays pixel identical.
Not in a single pass. The tool prints arabic numerals only. To mix numbering styles, split the document, number each part separately with its own starting value, and merge the parts back together in the original order.
Yes. Everything happens in your browser using pdf-lib, so the bundle stays on your machine. You can watch the network panel in your developer tools during a run and see that no request carries the document anywhere at any point.