# Add Page Numbers to PDF

URL: https://hifreetools.com/pdf/pdf-page-numbers

> Open a PDF and stamp page numbers onto every page — pick the position, the format, which number to start from, and the size. It runs in your browser, so your file is never uploaded.

## Quick answer

To add page numbers to a PDF, open it here and choose where the number goes (such as bottom center), the format (1, 1 / N, or Page 1), the starting number, and the font size. The tool draws the number onto every page and downloads the result. It runs entirely in your browser with pdf-lib, so nothing is uploaded and there is no watermark.

## Formula

- Number on page i (0-based): number = startAt + i

Your PDF is read locally. The tool embeds the standard Helvetica font and, for each page, builds the number text in your chosen format (just the number, number-of-total, or "Page N"), starting from your start value and incrementing by one per page. It measures the text width to place it correctly: x is set to the left margin, centred, or right-aligned, and y is near the top or bottom margin depending on the position you pick. The number is drawn directly onto the existing page in dark grey, then the PDF is saved and downloaded — all on your device.

## Examples

- Simple numbers, bottom center: A 5-page PDF, format 1, 2, 3…, start 1, bottom center → 1, 2, 3, 4, 5 centred at the bottom of each page
- “N / total” format: A 8-page PDF, format N / total, bottom right → 1 / 8, 2 / 8, … 8 / 8 in the bottom-right corner
- Start from a different number: A 3-page PDF, start at 5 → Pages numbered 5, 6, 7

## FAQ

**Is my file uploaded to a server?**
No. Page numbering runs entirely in your browser with pdf-lib — the PDF is read locally, the numbers are drawn on each page, and the new file is downloaded. Nothing is sent anywhere.

**Where can the page number go?**
Bottom center, bottom right, bottom left, top center, top right, or top left. You also choose the format, the starting number, and the font size.

**Can I start numbering from a number other than 1?**
Yes. Set 'Start at' to any positive whole number (for example, 5) and the first page will use that number, incrementing by one per page.

**Will it remove page numbers the PDF already has?**
No. It adds a new number on top. If the document already has numbers, both will show — check before stamping.

**What font is used?**
The standard built-in Helvetica font in dark grey, so the number is crisp and needs no font download.

**Is there a watermark?**
No. Only the page numbers you configure are added; there is no watermark or other text.


## Sources

- [pdf-lib — draw text on PDF pages](https://pdf-lib.js.org/)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Add Page Numbers to PDF", https://hifreetools.com/pdf/pdf-page-numbers
