Skip to content
BabaPDF
Learn

How to add page numbers to a PDF

5 min readHow to

Stamp real, searchable page numbers anywhere on a document, start from any number, and handle a cover page.

Page numbers are what a document gets when it stops being a draft. Somebody has to reference clause 12 on page 8, or collate a printout that got dropped, or file the thing somewhere that requires numbered pages. The document you have was probably assembled from parts and has none.

Add page numbers to a PDF

  1. Upload the PDF

    Drop in the file. The page count appears and the numbering controls follow.

  2. Pick a position

    Six of them — three across the top, three across the bottom. Bottom center is the default because it is right about 90% of the time.

  3. Pick a format

    Just the number (3), Page and the number (Page 3), or the number with the total (3 of 12).

  4. Set a starting number

    Leave it at 1, or set it to whatever this document continues from. Read the section below before you change it.

  5. Add page numbers

    Every page is stamped and the numbered copy downloads. Your original is untouched.

Add Page NumbersStamp page numbers anywhere on the document.

These are real numbers, not a picture of numbers

The numbers are drawn as actual embedded text in Helvetica, one of the fonts every PDF reader already has. That has consequences worth knowing, because the alternative approach — rendering the page and stamping pixels on it — is common and much worse.

Your numbers stay selectable. Ctrl+F for "of 12" finds them. A screen reader reads them. They print at your printer's resolution rather than at whatever DPI a rasteriser happened to choose, so they are sharp on paper. And the rest of your page is untouched: nothing is re-rendered, so text stays text and images keep every pixel they had. The file grows by roughly the size of the numbers, which is nothing.

A single dark glyph shape beside a small bright panel holding a cursor arrow
The number is embedded text, not a stamp. It selects, searches and prints like every other word on the page.

"3 of 12" does not mean twelve pages

This is the one that catches people, and it catches them silently. The total in "n of total" is not your page count — it is the last number that will be printed. A 12-page document starting at 1 reads "1 of 12", which is what you expect. The same 12-page document starting at 24 reads "24 of 35", because the numbering runs 24 through 35 and 35 is where it ends. The total is the last number, not the count. That is arguably correct for a document that continues from another one — "24 of 35" tells a reader where they are in the whole 35-page set — but if you expected "24 of 12" or "24 of 35" to mean something else, check the first page before you send it.

The rule is one line: the last page shows the highest number, and the total always equals it. Set Start at to 24 on a 12-page file and you get 24 of 35, 25 of 35, and so on to 35 of 35. If that is what you want — a section of a larger bound document — it is exactly right. If you wanted "page 24 of this 12-page file", that sentence does not describe anything coherent, which is worth noticing before you blame the tool.

What you cannot change

The controls on the page are the complete list, and two absences are worth stating plainly rather than leaving you to hunt for them.

  • Size, font and colour are fixed. 11pt Helvetica in near-black, 28 points in from the page edge. There is no slider, no colour picker, and no font menu — not hidden somewhere, simply not there. 11pt is a deliberate choice: big enough to read on paper, small enough to stay out of the way.
  • Roman numerals, prefixes and per-section numbering do not exist. Three formats, and that is all three.

There is no collision detection

The number is drawn wherever you pointed it, on top of whatever is already there. Nothing checks first. If your document already has a footer at the bottom of every page, bottom-center puts the new number straight through it, and you will get a downloaded file with two overlapping things in the same spot and no warning.

This is easy to work around and easy to be surprised by. Look at your document before you choose a position, not after: pick a corner nothing is using. Bottom-right is usually free on a document whose author centred a footer. If all six positions are occupied, this tool cannot help you — that document needs an editor that can reflow the page.

Every page gets a number, including your cover

There is no skip option and no page selector. Every page in the document is stamped, cover sheets and blank versos and appendix dividers alike. That is a real limit rather than a preference, and the honest workaround is a three-step round trip.

  • Split the document after page 1 to separate the cover from the body.
  • Run the body through this tool with Start at set to 2 — so the first numbered page reads 2, matching its position in the finished document.
  • Merge the cover back onto the front.

It is genuinely three tools for one job and there is no pretending otherwise. Worth it for something going out for real; not worth it for a printout you are about to collate on your desk.

Watch the Start at field: it accepts 0, and 0 silently becomes 1. The field will let you type it and the tool will not complain — you just get numbering that starts at 1 anyway. If you were trying to make the cover page 0 so the body starts at 1, that is the trick that does not work. Split the cover off instead.

A row of upright dark sheets; the first is bare and each of the rest carries a small bright dot near its foot
Start at exists for documents that continue from another one. The last number printed is also the total.

A note on what a number cannot do

Numbering a PDF does not make it tamper-evident and does not prove anything about completeness. A numbered set can still have a page removed — renumber it and nobody can tell from the numbers. If you need a document to prove it is intact, that is a signature and a hash, not a footer.

The stamping runs through pdf-lib in your browser and the file never leaves your device. Password-protected documents are turned away rather than processed — unlock it first, then number it.

Keep reading