Add Page Numbers to PDF

Drop one PDF, choose where the number sits and how it reads, then download a copy with a page number drawn on each chosen page — all on your own device.

  • Free
  • No account
  • Runs in your browser
  • Nothing uploaded
Add Page Numbers to PDFNothing uploaded
pt
pt

Runs entirely in your browser — your input is never uploaded, logged, or stored.Privacy policy

What is Add Page Numbers to PDF?

This tool writes page numbers onto a PDF and gives you a new file. It is for the everyday finishing job: numbering a contract or a report before sending it, putting "Page 3 of 12" on a scanned document whose pages were never numbered, stamping "1 of 4" on a form set, or adding a footer number to pages you assembled elsewhere. You choose the position, the wording, the starting number and the look, and the numbering is drawn only on the pages you pick.

There are six positions: top-left, top-center, top-right, bottom-left, bottom-center and bottom-right. The margin is the clearance from the page edge in points (1 point = 1/72 inch); 24 pt is about 8.5 mm. The position is worked out per page, so a document that mixes page sizes still has every number sitting neatly inside its own margins.

The label is a template. {n} is the page's number and {total} is the document's page count, so "Page {n} of {total}" prints "Page 3 of 12" on the third page of a twelve-page file. The four presets cover almost everything — 1, Page 1, 1 of N, Page 1 of N — and Custom lets you type your own template, for example "{n} / {total} — Confidential". The start number lets the first numbered page read something other than 1, which is useful when a document continues another one. {total} is always the page count of the whole PDF; if you set a start number above 1 the pair can look odd (for example "5 of 3" on a three-page file), so "of N" is best used with a start of 1. The font is one of the three built-in PDF fonts — Helvetica (sans-serif), Times (serif) or Courier (monospace) — and the size is 6–72 pt. Labels are drawn in black.

Pages can be the whole document or a list you type, such as "1-3, 5". A common use is numbering everything except a cover page: choose Selected pages and type 2-.

What "adding" means here: the number is drawn as ordinary text onto each page's content, so it is baked in — every reader and printer shows it, and it stays put. It is not an electronic page-number field (the PDF format has no such live field for page numbers), so a reader cannot toggle it on and off, and you cannot select it as a field the way you can a form box. Because the label is placed on top of the page, put the margin somewhere there is room: if your pages already have a footer or a page number from another program, choosing a different position or a larger margin avoids printing on top of it. The label is drawn with a standard font, which covers Latin letters, digits and punctuation but not Arabic, Chinese, Japanese, Cyrillic or emoji — a template using those characters is refused with a message saying so rather than producing blank boxes.

Two cautions. First, an encrypted or password-protected PDF cannot be edited here and is refused with a clear message; open it in a PDF reader with its password and save or print an unprotected copy, then number that. Second, changing a PDF invalidates a digital signature: if the file is signed, the signature covers its exact original bytes, so number the PDF before signing it, or accept that the signature will no longer validate in a signed copy.

Everything runs in your browser: the PDF is read, numbered and saved inside the tab, and is never uploaded. You can confirm in your browser's developer tools, on the Network tab, that no request carries your document. Files up to 200 MB are accepted, because the whole file is held in the tab's memory while it is edited.

1. The file's first bytes are checked for the PDF signature, then pdf-lib opens it; a damaged or encrypted file is refused with a specific message and the page count is read. 2. The settings are validated: a whole start number of 0 or more, a font size between 6 and 72 pt, a margin between 0 and 200 pt, and a label that contains {n}. 3. The pages to number are all pages, or the list you typed (numbers, ranges like 2-6, and 8- for page 8 to the end), checked against the page count. Pages are numbered in ascending order, so the first numbered page gets the start number and the next gets one more. 4. Each label is built by replacing {n} with the page's number and {total} with the document's page count. 5. The label is measured with the chosen font, and its baseline position is worked out from the anchor: left is the margin from the left edge, center is (page width − label width) ÷ 2, right is page width − label width − margin; bottom is the margin up from the bottom edge, and top is page height − margin − label height measured down from the top. PDF user space puts the origin at the bottom-left corner with y increasing upwards, and pdf-lib's drawText places the text baseline at (x, y), so the label height used here is the height above the baseline (the font's ascender at that size). 6. The label is drawn on each chosen page and the document is saved as <name>-numbered.pdf. Your original file is not changed.

The four label presets
 TemplateReads on page 3 of a 20-page PDFBest for
13Simple footers with no page count
Page 1Page 3Reports and letters where "Page" reads naturally
1 of N3 of 20Short labels that still show the total
Page 1 of NPage 3 of 20Contracts and formal documents

Worked examples

  • report.pdf (12 pages), Position bottom center, Label "Page {n} of {total}", start 1, Helvetica 11 pt, Margin 24 pt → report-numbered.pdf; page 1 reads "Page 1 of 12" and page 12 reads "Page 12 of 12".
  • A US Letter page (612 × 792 pt) with a 100 × 20 pt label and a 24 pt margin: bottom right → x = 612 − 100 − 24 = 488, y = 24; bottom center → x = (612 − 100) ÷ 2 = 256, y = 24; top left → x = 24, y = 792 − 24 − 20 = 748.
  • Pages "1-3, 5" on a 10-page file → only those four pages are numbered; the other six are left exactly as they were.
  • Start at 0 → the first numbered page reads "0", the next reads "1".
  • "1" in 11 pt Helvetica is 6.116 pt wide, and the font stands 7.898 pt above its baseline at that size — the measurements the tool uses to place the number.

How to use Add Page Numbers to PDF

  1. Click "Choose a PDF" or drop a PDF onto the box. The page count appears next to the file name.
  2. Choose the position in the Position list and the wording in the Label list (or pick Custom… and type a template with {n} and {total}).
  3. Set the start number, font, size and margin, and choose All pages or Selected pages (type a list such as 1-3, 5).
  4. Click "Add page numbers", check the preview line, then "Download" to save <name>-numbered.pdf.

Common errors

  • "The label must include {n} — that is the page number." — the custom template has no {n}, so every page would print the same text. Add {n} (and {total} if you want the page count).
  • "Start number must be a whole number of 0 or more — 1.5 is not." — type a whole number, for example 1. A blank box says "a blank value" in the same message.
  • "Font size must be between 6 and 72 pt — 100 pt is outside that range." — choose a size between 6 and 72 points.
  • "Margin must be between 0 and 200 pt — 250 pt is outside that range." — choose a margin between 0 and 200 points (24 pt ≈ 8.5 mm).
  • "Page 9 does not exist — this PDF has 6 pages." — the page list has a number past the end of the document. Correct the list.
  • "Page 1 is 100 × 100 pt, and the label … does not fit inside a 24 pt margin." — the page is too small for that label at that size. Use a smaller size, a shorter label, or a smaller margin.
  • "The label template uses characters the built-in fonts cannot draw …" — the built-in fonts cover basic Latin only. Use Latin letters, digits and punctuation, and drop Arabic, Chinese, Japanese, Cyrillic or emoji from the template.
  • "… is encrypted (password-protected or locked against editing), so its pages cannot be copied." — open the PDF in a reader with its password, save or print an unprotected copy, then number that.
  • "… could not be read — the PDF is damaged or incomplete." — the download did not finish or the file is corrupt. Download it again, or open it in a PDF reader and save a fresh copy.
  • "… is actually a JPG file, not PDF." — the file is an image with a .pdf name. Use JPG to PDF first if you want it as a PDF.

FAQ

How do I add page numbers to a PDF?

Drop the PDF here, choose the position (for example bottom center), pick a label such as "Page 1 of N", set the font and size, and click "Add page numbers". A numbered copy downloads as <name>-numbered.pdf; your original is not changed.

Are the page numbers real PDF page-number fields?

No — and there is no such live field for page numbers in the PDF format. The number is drawn as text onto each page, so it is baked into the document: every reader and printer shows it, but it cannot be toggled off or edited as a field. That is also why it is best to place it where nothing else already prints.

Can I number only some pages?

Yes. Choose Selected pages and type a list such as 1-3, 5, or 2- to number everything except the first page. The pages you leave out are not touched.

Can the numbering start at a number other than 1?

Yes. Set "Start at" to the number the first numbered page should show — for example 5. Note that {total} is always the document's page count, so "1 of N" is best used with a start of 1; with a start of 5 on a three-page file the label would read "5 of 3".

What do {n} and {total} mean?

{n} is the number of the current page and {total} is the page count of the whole document, so "Page {n} of {total}" prints "Page 4 of 10" on page 4 of a ten-page file. Any template without {n} is refused, because it would print the same text on every page.

Which fonts and sizes can I use?

The three built-in PDF fonts: Helvetica, Times and Courier, at 6 to 72 points. They cover Latin letters, digits and punctuation. Arabic, Chinese, Japanese, Cyrillic and emoji cannot be drawn with them and are refused with a message, rather than appearing as empty boxes.

Will adding page numbers break my PDF?

It does not re-render or recompress the pages, and bookmarks, links, form fields and metadata are kept — the number is added on top of each chosen page. One thing cannot survive any edit: a digital signature stops validating, because it covers the exact bytes of the original file. Number a document before signing it, or accept that the signature will no longer be valid.

Can I number a password-protected or encrypted PDF?

No. An encrypted PDF is refused with a message, because the library used here cannot decrypt it. Open the file in a PDF reader with its password, save or print an unprotected copy, and number that.

Is my PDF uploaded anywhere?

No. The file is opened, numbered and saved inside your browser tab. You can check the Network tab in your browser's developer tools and see that no request carries the document. Files up to 200 MB are accepted.

Can I remove page numbers afterwards?

Not with this tool — keep your original file and number a fresh copy each time. If you numbered a PDF here by mistake, the original you dropped in is untouched, so you can start again from it.

G

Prefer AllUtil on Google

One click adds AllUtil to your Google preferences. You'll see our tools highlighted with a Preferred badge in Search and AI answers.

2× more likely to clickWorks in AI Overviews

Reviewed by unreviewed

Written by Hamza AK. We research, build and test every tool before it is published.

Editorial policy

Last updated

Rechecked against the sources on this date, not stamped.

Methodology

The number is added as text content on each chosen page, so it is permanent and visible in every viewer and printer; it is not a live page-number field and is drawn on top of the existing page. Positioning is exact: PDF user space has its origin at the page's bottom-left with y increasing upwards (PDF 32000-1 §8.3.2.3), and pdf-lib's drawText anchors the text baseline at (x, y) (§9.4.2), so the height used to place a top label is the font's ascender at the chosen size — descenders (the "g" in "Page") sit a little below a bottom margin, as in print. {total} is the document's page count, independent of the start number and of which pages are numbered, so "of N" reads oddly when the start number is not 1. Only the three built-in fonts are offered, and they encode WinAnsi (basic Latin) text; other scripts are refused. The file is re-saved by pdf-lib, so its internal layout and size can differ from the original, and a digital signature stops validating. Encrypted PDFs are refused. Files up to 200 MB are accepted.