Add Page Numbers

Stamp pagination onto a PDF — your own format, position, font and starting number, written in this tab.

Runs on your devicePDFWorkingNo account needed

What this tool does

Add Page Numbers draws one line of text onto each page you select, using pdf-lib and one of the standard PDF fonts. Your document is opened and saved back rather than rebuilt from copied pages, so the outline, interactive form fields and the title and author entries come through unchanged, and the modification date is left alone. The number is real text in the page's content stream, so it can be selected, searched and copied like any other word on the page.

The format field decides what is printed. Five presets cover the usual shapes — 1, Page 1, 1 / 10, Page 1 of 10, and - 1 - — and Custom accepts any wording you like around the tokens {n}, {total}, {date}, {time} and {filename}, so “Appendix B, sheet {n}” is as valid as a bare digit. Two things about {total} are worth knowing before you use it: it resolves to the last number in the sequence you asked for rather than to the document's page count, and the counter advances once per stamped page rather than once per sheet — number pages odd-only in a ten-page file and they read 1 to 5, not 1, 3, 5, 7, 9.

Placement is described rather than dragged. Six positions cover the bottom and the top of the page at left, centre and right, and the distance in from the edge is typed in millimetres. The maths is done in the orientation the page displays at, so a sheet flagged 90, 180 or 270 degrees is numbered where a reader will look for it, upright, rather than at the matching corner of the unrotated coordinates. Eight standard PDF fonts are offered from 4 to 72 pt with a colour picker, and the run covers whichever pages you name: all, a block written 2-5, an open 7- for everything from page seven onward, or a mixed list such as 1,4-6,last. The words odd and even must stand alone, though — mixing one into a list, as in 1,odd, is refused.

pdf-lib does the writing here in the page, and the PDF is never handed to a server. Four limits are worth reading first. Nothing on the page is detected, so numbers already printed into a sheet stay exactly where they are and the new one is drawn over whatever occupies that corner, with no white box behind it; the margin is also measured from the file's media box rather than any crop box, so a page cropped down for print can carry its number closer to the visible edge than the setting suggests. Only decimal numerals are produced; there are no Roman numerals and no letter sequences. The standard fonts are encoded as WinAnsi, so Chinese, Greek, Cyrillic and emoji cannot be drawn and are replaced by a question mark, counted in the run summary. And a batch is a set of separate jobs, so every file restarts at your first number — Bates Numbering is the tool that carries one counter across a document set.

How to use it

  1. Add the PDF. Add a single PDF, or a handful under one set of settings. Each is numbered as its own job and comes back with -numbered added to the filename.
  2. Pick a format. Take one of the five presets, or choose Custom and write your own wording around {n}, {total}, {date}, {time} and {filename}.
  3. Place the number. Bottom or top, at left, centre or right; how far in from the edge, in millimetres; a standard font sized 4 to 72 pt, in a colour you pick.
  4. Set the first number and the pages. First number starts the count wherever you want it. Pages to number takes all, a block like 2-5, an open 7-, or a mixture such as 1,4-6,last; odd and even are accepted on their own.

Processing & privacy

Runs on your device. Your file is processed directly in this browser.

Common use cases

A report assembled from several files

Merge the parts first and number the result once, so the sequence runs through the finished document instead of restarting at every section.

Front matter that should not be counted

Set Pages to number to 5- and First number to 1, and the body opens at page 1 while the cover and the contents pages stay clean.

A bundle people will refer to out loud

Meeting packs, tender responses and court bundles need a printed folio in a fixed corner, so that “page 14” means the same thing to everyone holding a copy.

Proofing something that will be printed

Bottom-centre numbers at 10 pt make it obvious when a sheet is missing from a stack, or when the printer has handed back the pages out of order.

Questions

Is the PDF sent anywhere to be numbered?
No. pdf-lib opens the document and writes the numbers inside this tab, and no part of the file is sent to a server. The library is itself a script on this site, requested the first time you press Run rather than when the page opens, so a job begun after the connection has dropped needs an earlier run behind it in that tab.
Can I start the numbering after the cover pages?
Yes. Put 5- in Pages to number and 1 in First number, and page five carries the number 1. Note that {total} then reports the last number in that run rather than the document's real page count.
Can I take the numbers off again afterwards?
Not here. The text is written into each page's content stream, so from then on it is part of the page. The original on your own disk is not modified, so that is the copy to start again from when you want a different format.
Do Roman numerals or letters work?
No. The counter produces decimal numbers only. Any fixed wording can sit around it in the Custom format — “Annex {n}” or “- {n} -” — but i, ii, iii and A, B, C are not generated.
Why did some characters turn into question marks?
The standard PDF fonts are encoded as WinAnsi, which covers Latin text and common punctuation. Anything outside it — Chinese, Japanese, Greek, Cyrillic, emoji — cannot be drawn, so each such character becomes a question mark and the summary reports how many were replaced. There is no option to supply your own font.
Will the number land on top of my content?
It can. Nothing on the page is measured, and no panel is drawn behind the text, so a number placed in the same corner as an existing footer simply overlaps it. Raise the margin, move to another position, or use Header & Footer when you want lines in more than one slot.
Do bookmarks, forms and metadata survive?
Yes. The document is loaded and saved back rather than reassembled from copied pages, so the outline, form fields, annotations and the metadata entries stay as they were.
Can I number several PDFs as one continuous sequence?
Not with this tool — each file is its own job and restarts at your first number. Bates Numbering keeps a single counter running across a whole set and pads it to a fixed number of digits.
Can it number an encrypted PDF?
No. A document that wants a password is turned away before any stamping begins, and the message sends you to Unlock PDF; supply the password you hold there, and number the file that comes back.

Related tools

  • Merge PDF — Combine several PDFs into one document in the order you choose.
  • Split PDF — Split one PDF into separate documents by page range.
  • Compress PDF — Reduce PDF file size while preserving the quality that matters.
  • PDF to JPG — Export every page of a PDF as a JPG image.
  • JPG to PDF — Turn one or many JPG photos into a single PDF.
  • Protect PDF — Add a password and set permissions on a PDF.