Add page numbers
Number the pages, in the format and position you choose.
This tool runs entirely in your browser. Your file is never uploaded, and you can verify that in your browser's network tab. Verify it yourself: open your browser's network tab and watch. You will see one small request asking whether you have tasks left - a tool name and a hash, never the file.
What this does
This draws a number onto each page in the position you choose. The text goes into the page's content stream, so it is part of the document afterwards and prints exactly as it appears. The format is a template rather than a list of presets, which is why Page {page} of {pages}, - {page} - and {ROMAN} are all the same feature.
Use it on anything that will be printed, filed or referred to by page: a contract where the parties need to point at page 14, a scanned bundle that arrived unnumbered, or a report assembled from several separate files.
How it works
- Drop the PDF onto this page.
- Type the format. A bare {page} is the default; Page {page} of {pages} and {ROMAN} work the same way.
- Choose one of the six positions - three across the top, three across the foot.
- Set Start counting at if the numbering should not begin at 1, and First numbered page if the opening pages should stay unmarked.
- Adjust the size, colour and margins if the number lands too close to the existing content.
- Press Add page numbers and the download starts.
The template understands a small vocabulary and leaves everything else alone. {page} is the number and {pages} the total; {roman} and {ROMAN} give i and I; {alpha} and {ALPHA} give a and A in spreadsheet order; {page+1} and {page-2} shift the printed value. {filename}, {title} and {author} come from the document itself, and {date}, {time} and {datetime} from the clock. Anything else between braces is printed as typed, so a mistyped {pge} shows up on the page where you can see and fix it rather than vanishing.
Start counting at is the number printed on the document's own first page, and the count runs up from there: set it to 25 and page 1 reads 25, page 2 reads 26. {pages} moves with it, so Page {page} of {pages} stays arithmetically true when one document continues another's numbering.
First numbered page does a different job - it decides which page first receives a mark, without changing what that mark says. Set it to 4 and pages 1 to 3 stay clean while page 4 still reads 4. If you want the fourth page to read 1, split the front matter off, number the body on its own, then merge the two back together.
The number is drawn on top of whatever is already there, and the page is never shrunk to make room, because scaling a page changes every measurement in it to solve a problem you can see. If a number lands on existing content, raise the vertical margin, drop the size, or move it to another corner.
The font is always embedded, so accented characters, Greek and Cyrillic print correctly on any reader. CJK, Arabic and Indic are not covered; the fonts that would cover them run to tens of megabytes each.
What this tool cannot do
- Numbers that are already printed in the document are neither found nor replaced. A page that carries its own number will show two unless you place the new one somewhere else, or remove the old numbering another way first.
Questions people ask
- What can I put in the format box?
- Any text, plus tokens in braces: {page}, {pages}, {roman}, {ROMAN}, {alpha}, {ALPHA}, offsets such as {page+1}, and {filename}, {title}, {author}, {date}, {time}, {datetime}. Page {page} of {pages} prints Page 3 of 12; - {ROMAN} - prints - III -. A token not on that list is printed exactly as typed.
- How do I leave the cover page unnumbered?
- Set First numbered page to 2. Page 1 stays clean and numbering starts on page 2, which still reads 2, because the count follows the document's own page positions. If you need that second page to read 1 instead, split the cover off, number the rest, and merge them back.
- Can I use roman numerals or letters?
- Yes. {roman} gives i, ii, iii and {ROMAN} gives I, II, III; {alpha} and {ALPHA} give a, b, c and A, B, C, continuing to aa past the twenty-sixth page. Roman numerals repeat M above 3,999, which is the usual convention, since the classical overline needs a glyph no font can be relied on to have.
- The document already has numbers. Will they be replaced?
- No. The new number is drawn on top of the page and the old one stays where its producer put it. Put the new number in a different corner, or use a page range so only the pages that need one get it.
- Is my document uploaded to number it?
- No. The stamping is done by pdf-lib in a Web Worker on your device, and the font it embeds comes from this site's own origin rather than a font CDN, so even that is not a request to anyone else. A 500-page bundle is numbered without a byte leaving your machine.