Skip to content
Server-sideDeleted in 30 minutes

Add Page Numbers to a PDF

Stamp page numbers onto a finished PDF, choosing the format, the position, and which page the numbering starts on. Skipping a cover page and beginning at one on the page after it is a single instruction rather than a workaround, because that is what almost every real document needs. The file is rewritten in this single pass, with the numbering format you choose.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free

What it does

  • Four numbering formats including Page N of M
  • Start numbering at any value
  • Skip a cover page or any other range
  • Seven positions with adjustable margin
  • Adds almost nothing to the file size

How to use Add Page Numbers to PDF

  1. 1

    Open the PDF

    Drop the file in. The page count is read straight away so you know what you are numbering.

  2. 2

    Choose which pages get a number

    Blank numbers every page. Type "2-" to skip a cover page and number from the second onwards.

  3. 3

    Set the format and position

    Page N of M is the usual choice for anything that might be printed. Bottom center is the conventional position.

  4. 4

    Stamp and save

    Press Add page numbers and save. Your original file is not modified.

How it works

For each selected page, the label is composed, measured in the chosen font at the chosen size, and drawn at a computed position.

The measuring step is not optional. Right-aligning "Page 9 of 24" requires knowing how wide that string is in Helvetica at 11 points, and the answer differs from "Page 10 of 24" by more than you would guess. Without measurement, right-aligned numbers drift as the page count crosses ten and a hundred.

Position is where PDF work goes wrong most reliably. The coordinate origin is the BOTTOM-left of the page and y increases upward, which is inverted from every screen coordinate system. "Top of the page" therefore means pageHeight - margin rather than margin, and it must also subtract the text's own height or the ascenders are clipped off the edge. That calculation is asserted in this project's test suite for exactly that reason.

Helvetica is used because it is one of the fourteen standard fonts that every PDF reader is required to provide. Nothing is embedded, so the file grows by a few dozen bytes per page rather than by the size of a font.

The numbering counts across the pages you selected, not across the file. That is the behavior that makes "skip the cover" produce a document reading "Page 1 of 24" rather than "Page 2 of 25".

When you'd use this

Documents assembled from several sources, where the pieces each had their own numbering or none at all. Merging is the common cause: three PDFs combined into one give you a document with no consistent numbering anywhere.

Printed documents generally. Numbers are what makes a dropped stack recoverable and a reference to "page 14" meaningful.

Submissions with a stated format — courts, funding applications, and academic bodies frequently specify both the numbering style and where it sits.

Scanned documents, which arrive with whatever was printed on the original and often nothing at all.

Choosing a format

Page N of M is the most useful for anything printed, because it tells a reader whether they are holding the whole thing. It is the right default.

Just the number suits documents that will be read on screen, where the total is visible in the reader anyway and a bare numeral is less intrusive.

N / M is a compact form of Page N of M, useful when space is tight.

Page N without a total is worth avoiding unless something else in the document states the length — it takes up the room of the fuller form while telling the reader less.

Examples

A report with an unnumbered cover

report.pdf — 25 pages Pages: 2- · Format: Page N of M · Start at 1
Stamping 2-25 Cover page left clean; page 2 of the file reads "Page 1 of 24"

The count runs over the stamped pages rather than the whole file, so the total says 24 and not 25. That is what you want — a reader holding the numbered pages should see a total that matches how many numbered pages exist, not one that includes a cover they were never shown a number for.

A chapter that continues from an earlier document

chapter-two.pdf — 18 pages Pages: blank (all) · Format: Just the number · Start at 47
Pages numbered 47 through 64

Starting at an arbitrary value is what makes a document split across several files work as one. Most page-numbering tools always start at one, which forces you to merge everything first and split it again afterwards.

Frequently asked questions

Can I start numbering at something other than 1?

Yes, and it is the reason this tool has a "start at" box. Documents routinely need it — front matter numbered separately, a chapter continuing from a previous file, or a bundle where the numbering was agreed in advance. Set the starting value and the numbering counts up from there across whichever pages you selected.

How do I keep the cover page clean?

Type "2-" in the pages box, which means page two to the end. The cover is left untouched and numbering begins on the page after it. Any selection works the same way, so you can also skip a table of contents or an appendix by listing the ranges you do want.

Will this make the file much bigger?

No, barely at all. The numbers are drawn using Helvetica, which is one of the fourteen standard PDF fonts that every reader already has, so nothing needs to be embedded. Each page gains a few dozen bytes of drawing instructions. A hundred-page document typically grows by a few kilobytes.

Can the numbers be removed later?

Not easily. They become part of the page's content, exactly like text that was there originally, so there is no layer to switch off. Keep your original file — the tool never modifies it — and re-stamp from that if you need different numbering rather than trying to undo what is there.

What if the page already has something where the number goes?

The number is drawn on top of it, because a PDF has no concept of reflowing existing content to make room. If the bottom center of your pages already carries a footer, choose a different position or increase the margin. There are seven positions, and the margin control moves the number away from the edge.