How to Add Page Numbers to a PDF
September 23, 20263 min readHow to number PDF pages that don't have them, using the {n}/{total} format template and a custom starting number.
Page numbers make a long document navigable and let you say “see page 12” and have it mean something. Word processors add them automatically, but a PDF assembled by merging several source files or exported from something else often has none — this is how to add them after the fact, to any PDF.
How to add page numbers
- Upload your file to the Page numbers tool.
- Choose a position (bottom-center is the standard choice) and a font size.
- Set the starting number and the format, then check the live preview of page 1.
- Download — every page gets numbered in sequence.
Using the format template
The format field accepts {n} for the current page number and {total} for the total page count, so you can build exactly the label you want:
{n}→1,2,3…{n} / {total}→1 / 24,2 / 24…Page {n}→Page 1,Page 2…
Starting from a number other than 1
If the document you’re numbering is actually a continuation of another one — say, a second volume that should start at page 51 — set the starting number field accordingly. Every page counts up from there, and {total} still reflects the actual number of pages in this file.
Combine with a watermark
Page numbers and watermarks use the same position picker in Toolify, so you can run a document through Watermark first (say, a corner logo) and then add page numbers in a different corner without the two overlapping.
A note on privacy
Numbering happens entirely in your browser using pdf-lib, and the page-1 preview renders locally with pdf.js. The PDF is never uploaded to a server at any point.