Searching...
No tools found

How to Add Page Numbers to a PDF (and Why They Go Missing)

PDF··9 min read

Page numbers are easy until the number lands somewhere the reader cannot see. How to number a PDF properly, why "Page 1 of 10" and "Page 1 of 20" are both right, and the cropped-page trap that hides the number on print-ready files.

Some documents need page numbers before they go anywhere. A report that will be printed and bound. A contract with a schedule attached to the back. A bundle going to a court, an insurer or a client, where "see page 14" only works if page 14 says so. A thesis that will be marked, cited and argued about by page.

Adding them should be the easiest thing in this guide. It is not, because two things decide whether the number you added is actually visible on the page, and both of them are invisible in every PDF reader you have. This guide covers how to number a PDF without uploading it anywhere, and how to tell whether the number you just added is in the right place.

Two mechanisms decide whether your page number is visible

Before the how-to, the two things worth knowing. Both are properties of the page itself, and both are ignored by a surprising number of tools.

The visible area is not the page. A PDF page can carry more than one rectangle. There is the /MediaBox, which is the physical sheet, and there is the /CropBox, which is the part a reader actually shows. On a clean export from Word or Google Docs the two are the same and this never comes up. On a print-ready file — one that came from InDesign, or was cropped with Acrobat's "Crop Pages", or was set up in LaTeX with a bleed — the CropBox is smaller than the MediaBox, and everything outside it is clipped away by the viewer.

A footer positioned against the page's declared size therefore lands in the clipped strip, and the reader sees a document with no page numbers at all. Nothing errors. The number is in the file. It is just not on the page.

The page can be stored sideways. A scanned page is usually stored as landscape pixels plus a rotation instruction telling the viewer to turn the page for display. Text drawn without accounting for that instruction is rotated along with everything else, so the number ends up running down the side of the page, reading bottom to top.

How to add page numbers to a PDF in the browser

The Add Page Numbers to PDF tool does the whole job in a browser tab, with no upload and no account. Here is the workflow, using the actual control names.

  1. Open the PDF. Drag it onto the page or use the file picker. Several documents can go in at once — the settings apply to the whole batch.
  2. Choose the position. Nine anchors: the four corners, the four edge midpoints and the centre. Bottom centre is the default, and it is what most printed documents use.
  3. Choose a format. A plain number, Page 1, 1 / 10, Page 1 of 10 (counting only the pages you numbered), or Page 1 of 20 (counting the whole document). The difference between the last two is the next section.
  4. Optionally, write your own text. The custom box accepts {n} for the current number, {N} for how many pages you numbered and {T} for the document total, so Confidential — {n} of {T} prints Confidential — 4 of 20 on the fourth page.
  5. Say which pages to number. Leave the box empty for every page, or type 2-10 to skip the cover, 2- to run to the end, -5 to stop at five, or 1,4,7-9 for a list.
  6. Set the first number. This is the number that appears on the first page you numbered, so skipping a cover page does not leave a gap in the count.
  7. Adjust size, margin and colour if the default does not suit the page. Then download, or take the batch as a ZIP.

Everything runs in the tab. There is no server step, which you can verify by loading the page, disconnecting from the internet and numbering a file.

"Page 1 of 10" or "Page 1 of 20"? Both are right.

This is the question every tool answers differently and almost none of them explain.

Take a 20-page report with a cover page you do not want numbered. You ask for pages 2 to 11 to be numbered, starting at 1. The eleventh page is the tenth numbered page, and it is also the eleventh page of the document. So the footer on it can honestly read Page 10 of 10 or Page 10 of 20, and both look completely reasonable on the page.

Which one you want depends on the document. For a bound report where the reader navigates by the numbers they can see, counting the numbered pages is right. For a document that is part of a larger bundle, or where the reader may refer to "page 17" meaning the physical sheet, the document total is right.

Most tools pick one, print it, and let you discover which afterwards. Here you choose: of 10 counts the pages you numbered, of 20 counts the whole document, and the custom box lets you use both in one label if you need to.

Why the number you added is invisible on a cropped page

This is the one that sends people looking for another tool, and it is worth doing properly because the failure is silent.

I built a test file for exactly this: a four-page PDF whose first page is a 300 by 400 point sheet carrying a /CropBox of [40 60 260 360] — so the sheet is 300 wide but only 220 points of it are ever shown, and the visible area starts 40 points in from the left and 60 points up from the bottom.

Numbering that page with a 36-point margin, the footer lands at x = 76, y = 96. Both are 36 points inside the visible area, which is exactly where a footer should be.

A tool that positions the footer against the page's declared 300 by 400 size puts the same footer at x = 36, y = 36. The horizontal position is wrong by 4 points, which nobody would notice. The vertical position is 24 points below the bottom of the visible area — inside the strip the CropBox clips away, and therefore on no screen, in no printout, in no preview.

The same trap bites at the top of the page. A top label at a 24-point margin belongs at y = 328.83 on this sheet. Positioned from the declared size it lands at y = 368.83, which is 8.83 points past the 360-point top edge of the visible area.

The tool here computes every position against the intersection of the CropBox and the MediaBox, so the number is always inside the part of the page a reader can see. I checked it by reading the produced file's own text matrix with two independent parsers — qpdf and a separate one written for the test — and both report the same anchor to the point. On the four-page test file the output went from 1,452 bytes to 1,963 bytes, with the original page content carried through untouched.

Why the number is sideways on a scan

The other half of the same problem. A scanned page is stored the way the scanner captured it — usually landscape — with a rotation instruction on the page telling the reader to turn it for display.

Draw the number in the page's own coordinate system and the viewer rotates it along with everything else, so it appears running down the side of the page. It is a small piece of arithmetic: work out where the label belongs in the orientation the reader sees, then map that back through the page's rotation before drawing.

On the same test file, with pages carrying /Rotate 0, 90, 180 and 270, the four labels are written at page-space text angles of 0, 90, 180 and 270 respectively — the compensating angles that make all four read horizontally on screen. A tool that ignores rotation writes all four at 0, which looks correct on the one upright page in the file and wrong on the other three.

If your source document has a page stored sideways that you would rather fix than number around, the Rotate PDF tool handles that separately.

What the desktop routes actually produce

Worth knowing if you already have one of these open.

  • Microsoft Word numbers pages through the footer, which means the numbering lives in the Word document. If you only have the PDF, there is no footer to edit — you would be rebuilding the document. Word's PDF export also re-renders the pages, so a scan inside it loses a generation of quality.
  • Adobe Acrobat has a proper "Add Header & Footer" feature with the most control of the three, and it costs a subscription. It edits the PDF directly, without re-rendering.
  • macOS Preview has no page-numbering tool. The usual workaround — a text box in Markup — numbers one page at a time, by hand.
  • LaTeX and Word's own styles are the right answer when you still have the source. Numbering the PDF is what you do when you do not.

The online tools are a mixed bag. The three largest upload your file to a server to have a digit drawn on it and hold it there for an hour afterwards; one of them asks you to sign a data-processing agreement if the document contains anyone else's personal data. The strongest browser-based competitor is genuinely good and rotation-aware, but caps you at three documents a day and sells the rest. A page number is not worth a subscription.

The awkward cases, and what should happen

A tool is judged by what it does when the input is not a clean ten-page report. Here is what this one does, so you can check it against your own file:

  • Password-protected PDFs are refused, by name. Not because it is hard, but because it cannot be done correctly: a protected file stores its page content encrypted, and a new label added on top would be plaintext inside a document that claims to be encrypted — a file no reader will open. Remove the password, number the file, protect it again.
  • A non-PDF is refused by name. Renaming a Word document to .pdf does not make it one, and the tool says so rather than producing an empty file.
  • A page range that makes no sense is refused with the fragment quoted. 9-2 is told it runs backwards rather than silently numbering nothing; 99 on a four-page document is told the document has four pages; abc is told it is not a page or a range.
  • Non-Latin custom text is refused with a reason. The PDF standard fonts cover Western European characters only, so a Cyrillic, Greek, Arabic or CJK label needs a font embedded in the file. Rather than producing a page of blank boxes, the tool says what the limitation is. Digits, Latin letters and accented characters all work.
  • Your metadata is left alone. The document's own author, title and producer fields are not overwritten, the text stays selectable and searchable, and images keep their original resolution — the label is added as a layer, so nothing is re-rendered. If the metadata itself is the problem, that is a separate job.

Numbering a whole folder of documents

Legal and administrative work rarely involves one file. A bundle to be paginated before it is bound, a set of statements to be numbered before they are filed, a batch of reports to be made referenceable.

Drop them all in at once. The settings panel belongs to the batch, so the position, format, size and page range you choose apply to every document, and each comes back as name-numbered.pdf. Download them individually or take the set as one ZIP. There is no daily limit, because the work happens on your own machine and there is no server cost to ration.

If the files are too large to send afterwards, the PDF compressor will bring them down — again without uploading anything.

The short version

Adding page numbers is a two-part problem: putting the number where you want it, and putting it where the reader can see it. The second part is the one that fails silently, on cropped pages and on scans.

Decide first what "of" means in your footer, because Page 10 of 10 and Page 10 of 20 are both defensible and you should choose deliberately. Skip the cover page with a range rather than by numbering it and pretending. And if the numbers come out missing, the file is probably cropped — which is a tool problem, not something you did wrong.

Number your PDF in the browser — nine positions, page ranges, your own text, and the file never leaves your computer.

Frequently asked questions

How do I add page numbers to a PDF for free?

Open the PDF in a browser-based numbering tool, choose where the number should sit and what it should say, then download the numbered file. A tool that runs entirely in the browser does this without uploading the document, so there is nothing to sign up for and no daily limit. If you still have the original Word, LaTeX or InDesign file, editing the source and re-exporting is usually better — numbering the PDF is what you do when the source is gone.

Why did my page numbers not appear on the PDF?

On a cropped PDF the number is usually in the file but outside the part of the page a reader shows. A page carries a MediaBox (the physical sheet) and often a CropBox (the visible area), and a print-ready file frequently has a CropBox smaller than its MediaBox. A tool that positions the number against the declared page size puts it in the strip the CropBox clips away, so it is invisible on screen and in print with no error. Numbering tools need to position against the visible area, not the sheet.

Should the footer say "Page 1 of 10" or "Page 1 of 20"?

It depends on what the reader needs to count. If you number pages 2 to 11 of a 20-page report, "of 10" counts only the pages you numbered and "of 20" counts the whole document — the tenth numbered page is the eleventh sheet either way. Choose "of 10" for a bound document the reader navigates by its own numbers, and "of 20" when the document is part of a larger bundle or someone may refer to a physical sheet number.

Why is my page number sideways on a scanned PDF?

Scanned pages are usually stored as landscape pixels plus a rotation instruction telling the viewer to turn the page for display. A tool that draws the number without accounting for that instruction draws it upright relative to the stored page, so the viewer rotates it too and it appears running down the side. The fix is to compute the position in the orientation the reader sees and map it back through the page rotation before drawing, page by page.

How do I skip the cover page when numbering?

Enter a page range instead of numbering everything: "2-10" numbers pages two through ten and leaves the cover alone, "2-" runs to the end of the document, "-5" stops at page five, and "1,4,7-9" numbers exactly those pages. The "first number" setting controls the number that appears on the first page you numbered, so skipping the cover does not leave a gap in the count.

Are my PDFs uploaded when I use this tool?

No. The document is read, numbered and saved inside your browser tab. There is no server component, no upload and no storage, which you can verify by loading the page, turning off your internet connection and numbering a file. This matters more than usual here, because the documents people paginate — contracts, court bundles, medical reports, unpublished work — are the ones they least want to hand to a website.

Does adding page numbers reduce the PDF quality?

No. The number is added as a new layer on top of each page rather than by re-rendering the page, so the existing text stays selectable and searchable, images keep their original resolution, and fonts are unchanged. The document's own author and producer metadata is left alone as well. The only pages that change are the ones you numbered, and they only gain a layer.

Can I number a password-protected PDF?

Not while the protection is on. Numbering means rewriting the page contents, and a protected file stores those contents encrypted, so a label added on top would produce a document no reader could open correctly. Remove the password first, number the file, then apply the password again if you still need it.

Written by the Chaudify team. Every tool mentioned here runs entirely in your browser — nothing you open is ever uploaded. Browse all tools or read more guides.