PDF Page Numberer
PDF Page Numberer
Position
How to add page numbers
Add your PDF
Drag your file onto the dropzone or click to choose. The tool shows the page count once loaded.
Pick a position
The 3×3 grid corresponds to where on each page the number lands. Bottom-centre is the most common choice; if a court, publisher or examiner sets a position, follow their rules.
Choose a format
Presets cover the common cases — plain number, fraction-of-total ("1 / 10"), "Page 1 of 10", and so on. For anything else, pick Custom… and use {n} for the current page and {total} for the total. Example: Document A — page {n}.
Set start number and skip if needed
Start number defaults to 1. Skip first N pages defaults to 0 — bump it up if your PDF starts with a cover or TOC that shouldn't be numbered. The starting number applies to the FIRST numbered page, not the first physical page.
Click Add page numbers and download
pdf-lib draws the text on each page at the calculated position and saves the result as {original}-numbered.pdf. Positions are measured on the page as you see it: a page turned sideways in the file, or one whose visible area (its crop box) is smaller than the paper, still gets its number at the spot you picked.
PDF page numbering — text drawn on top, not text replaced
Adding page numbers to a PDF is a different operation from editing the document's text. The PDF format stores existing page content as a sequence of drawing operators (place this font, draw this string at this position); adding a page number means giving each page one more short sequence of its own. The page's existing content is left as it is, so its text stays selectable and searchable. In a 1,000-page test the numbers added about 196 bytes a page.
Legal, audit and signed documents
Leaving each page's own drawing untouched is what keeps the text exact: nothing is re-rendered, re-flowed or retyped. It does not make the result the same file. pdf-lib writes the whole document out again rather than appending a change to the end of the original (the incremental update ISO 32000-1 §7.5.6 describes), so the output has different bytes, a different hash and a new modification date. A digital signature covers the exact bytes that were signed, so numbering a signed PDF breaks its signature — number the bundle first and sign it afterwards, or use the signing software's own stamping feature.
A page number should be drawn on the page, not typed into its text. Numbering a signed PDF still makes it a new file, so number first and sign last.
Numbers the reader sees, and numbers the reader's app shows
The numbers this tool draws are part of the page — printed, visible in every reader. PDF also has page labels, a separate feature that changes what a reader's page box shows ("iii", "iv", then "1"), without drawing anything. Skip-first-N covers the common case of an unnumbered cover or contents page, and {total} is the last number printed, so the final page always reads "N of N".
What this tool does — and what it doesn't yet
This tool adds simple text-based page numbers at one of 9 positions, with format presets and a custom template, starting from any number, with optional skip-first-N. What it does not do yet: alternate odd/even page positions (inside-margin pagination for bound documents), Roman numerals for front-matter, automatic font-matching to existing document fonts, or color customisation. Those are on the roadmap. For now, if you need elaborate alternating-page pagination, a desktop tool like PDF Annotator or Acrobat is the right choice — for plain "add bottom-centre numbers to this document", this tool is quicker and never uploads the file. Numbers use Helvetica, which only has Western European characters, so a format like 第{n}页 is refused with that reason.
Physical pages against page labels, the 14 standard fonts, and rotation flags
PDF page numbers are drawn as text on top of the existing page — its own drawing is left as it is, and the number goes in a short content stream of its own.
The "physical page" (sheet 5 of 10) and "logical page" (Section A, page 3) can differ. Skip-first-N lets you handle that — the numbering starts after the skipped pages.
The PDF spec has a separate concept called Page Labels that lets a reader display alternative labels (e.g., "iii, iv, 1, 2") in the page navigator. This tool adds visible numbers; Page Labels are a separate (and complementary) feature.
Helvetica is one of the 14 "standard" PDF fonts — every PDF reader can render it without embedding the font in the file. That is why numbering adds so little: about 196 bytes per page in a 1,000-page test.
A page's rotation flag turns it clockwise when shown, in steps of 90° (ISO 32000-1, Table 30). The tool places the number on the page as displayed and turns the text to match — until 26 October 2026 it got pages turned 90° or 270° wrong, often drawing the number off the page.
This tool's default margin is 24 pt — a third of an inch, about 8.5 mm — from the page edge; raise it if the number collides with a footer.
Numbering keeps the document's creation date and sets its modification date; the page's own text stays selectable underneath.
{total} is the last number printed, not the physical page count. "Page {n} of {total}" with 2 skipped pages on a 10-page doc reads "Page 1 of 8" through "Page 8 of 8"; started at 5 with nothing skipped, it reads "Page 5 of 14" through "Page 14 of 14".
Numbering a 1,000-page test file took 0.6 seconds on a desktop browser — drawing one short line per page is light work.
The output grew by about 196 bytes per numbered page in that test — the text operation plus the page's updated resources.
FAQ
-
No. The pdf-lib library runs in your browser. Your PDF is read into memory, drawn on, and saved straight back to your downloads folder. Open DevTools → Network while you number a file: no request carries it.
-
Yes — set "Skip first N pages" to 1. The cover page is left untouched and page 2 of the document becomes "page 1" in the numbering (or whatever you set Start number to). Set to 2 for cover + TOC, etc.
-
Use
{n}for the current page number and{total}for the last number printed. Example:Page {n} of {total}on a 10-page file produces "Page 1 of 10" through "Page 10 of 10". You can include any other text:App. A — {n}produces "App. A — 1", "App. A — 2", and so on. -
Not yet — this version uses Helvetica (a built-in PDF standard font). Custom font embedding is on the roadmap. For most documents Helvetica is the safe choice since it's universally supported and doesn't add to the file size.
-
Yes. The tool reads each page's rotation and draws the number on the page as displayed, upright. A page turned to landscape gets its "bottom-centre" number at the bottom of what you see. It also measures from the page's crop box — the visible area — so a file with a trimmed or offset page box does not push the number out of view. Both were fixed on 26 October 2026; before that, pages turned 90° or 270° got their number in the wrong place.
-
No — not even one that opens without a password. "Restriction-only" protection (an owner password that blocks printing or editing) still encrypts the file's text and images, and pdf-lib, the library this tool uses, cannot decrypt them, so anything it saved would be broken. Since 30 September 2026 the tool says so as soon as you add such a file, instead of numbering a copy that will not open. Save an unprotected copy first, in software that has the password.
-
Yes. The page numbers are drawn as real PDF text, not as images — they're selectable, searchable, and copyable. The original document content is untouched. Existing text remains selectable as before.
-
Not yet — the format template uses Arabic numerals only. The common academic pattern of Roman front-matter then Arabic body matter is on the roadmap. For now, the workaround is to split the PDF into front and body, number each separately, and merge them back.
-
They are drawn on top of whatever's at that position. If the bottom margin of your document is already used (existing footer, watermark), the page number may overlap. Bump the margin value up — try 36 or 48pt — to push the number further from the edge into clearer space.
-
Yes on iOS Safari and Chrome on Android. The position grid wraps to a 3×3 touch target. Numbering is light work — a 1,000-page file took 0.6 seconds on a desktop browser, and a phone is slower but still quick.
Method & sources
How it computes
after skipping the first N pages, page k gets start + k; {total} is the last number printed. The number is placed on the page as displayed — inside the CropBox, after its clockwise /Rotate — at one of nine positions a margin (default 24 pt) from the edge, then mapped back to page space for pdf-lib and drawn upright in Helvetica. Formats Helvetica cannot encode are refused; the creation date is kept and the modification date set.
What this tool implements
- ISO 32000-1:2008 §7.7.3.3 Table 30: /Rotate is "the number of degrees by which the page shall be rotated clockwise when displayed or printed" and "shall be a multiple of 90"; CropBox "shall define the visible region" and defaults to MediaBox. Corrected 2026-10-26: 90° and 270° pages were mapped with swapped formulas and the wrong dimension, -90/450 were not handled, and boxes not starting at (0, 0) were ignored. Verified by rendering test pages with poppler (pdftotext -cropbox -bbox) before and after.
- ISO 32000-1 §7.5.6 describes incremental updates, which leave the original bytes intact; pdf-lib 1.17.1 has no incremental save and writes the whole file again. A signature's ByteRange (§12.8.1) names "the exact byte range for the digest calculation", so numbering a signed PDF invalidates the signature. The page had presented numbering as the "correct behaviour" for document integrity and called other tools "pretend-tools"; both were removed.
- Re-measured 2026-10-26 in Node with the vendored pdf-lib: numbering a 1,000-page A4 file added 196.8 bytes a page (the page says about 196). The 0.6-second browser timing was not re-measured (Node took 0.33 s). ISO 32000-1 §9.6.2.2: the standard 14 fonts, Helvetica among them, shall be available to the reader, so none is embedded.
Sources
- Adobe. PDF 32000-1:2008 — Document management, Portable document format, Part 1: PDF 1.7 (free copy of ISO 32000-1; 7.5.6 Incremental updates, 7.7.3.3 Table 30 Rotate and CropBox, 9.6.2.2 Standard 14 fonts, 12.4.2 Page labels, 12.8.1 ByteRange). 2008. https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF…
- Hopding A. pdf-lib 1.17.1 README (the version served from /assets/vendor/pdf-lib/), Encryption Handling. https://raw.githubusercontent.com/Hopding/pdf-lib/v1.17.1/README.md
What can make this go out of date
- None at runtime: the PDF is read, numbered and saved in the browser by the self-hosted pdf-lib 1.17.1, and nothing is uploaded.