Skip to content

Add Page Numbers to a PDF

Drop a PDF, pick a corner and a format, and stamp every page. Nothing leaves your browser.

This tool does not add a form field or an annotation that a viewer overlays on top of the page — it draws the page number directly into each page's content stream, the same low-level drawing instructions that place every other piece of text and graphics on the page. An embedded standard font (Helvetica) is used to measure and render the text, so the number becomes a permanent, selectable part of the page itself. That means it prints correctly, survives flattening, and looks identical in every PDF viewer — there is nothing to toggle on or off later. The whole operation runs locally in your browser via pdf-lib; the file is never uploaded.

Drop a PDF here, or

One PDF, up to 64 MB. Stays in your browser — nothing is uploaded.

How to use

  1. Drop your PDF

    Drag a PDF (up to 64 MB) onto the dropzone or click to choose one. The tool reads its page count locally.

  2. Choose position and format

    Pick where the number sits — bottom center, bottom left, bottom right, top center, top left, or top right — and a format: plain “3”, “Page 3”, or “3 of 12”.

  3. Set the starting number and size

    By default numbering starts at 1 and prints at 10pt. Raise the starting number if this file continues a previous document, or adjust the font size to match your page margins.

  4. Stamp and download

    Click “Add page numbers”. The tool draws the chosen text onto every page using an embedded font and gives you a single download — the original filename with “-numbered” appended.

Frequently asked questions

Can I start numbering from something other than 1?
Yes. The “Starting number” field sets what the first page is labeled — useful when this PDF is a continuation of an earlier document (say, a thesis appendix that should start at 47) or when you want the numbering to match physical pages already printed elsewhere.
Can I skip numbering the first page, like a cover sheet?
Not directly in this version — every page in the file gets a number. The common workaround is to set the starting number to 0: the cover page is stamped “0” (or left effectively unlabeled if you crop it after), and every following page carries the correct sequential number. For a cleaner result, split the cover page into its own file first, number only the remaining pages, then merge them back together.
Does this work on scanned or image-only PDFs?
Yes. Page numbering does not depend on the page containing selectable text — it draws a new text object into the content stream regardless of what else is on the page, image or vector. A scanned PDF gets the same crisp, vector-drawn number as a text-based one.
Can I remove the numbers later if I change my mind?
Not with this tool, and generally not easily with any tool. Because the number is drawn directly into the page's content stream, it is now part of the page's drawing instructions, the same as the rest of its content — there is no separate annotation layer to delete. Keep your original, un-numbered file if you might need to redo this with different settings.
What if my PDF already has page numbers printed as part of the content?
This tool has no way to detect or remove existing text, so the new number is drawn on top of (or near) whatever is already there. If the document was exported from Word, Google Docs, or LaTeX with page numbers baked in, turn those off in the source document and re-export before stamping, or you will end up with two numbers per page.
Will the numbers look right if my pages are different sizes?
Yes. The position is computed per page from that page's own width and height (for example, centered horizontally uses that page's width, not a fixed value), so mixed page sizes — a PDF with both A4 and Letter pages, for instance — each get a correctly placed number rather than one calibrated to a single page size.

About

How drawText and embedded fonts work in a PDF content stream

Every page in a PDF has a content stream: a sequence of low-level drawing operators such as “move to,” “draw this glyph,” and “set fill color.” Text is not stored as a string the way a text editor sees it — it is a series of glyph references into a font program, positioned by explicit coordinates. Before you can draw text, that font must be listed in the page's resource dictionary so the content stream's text operators know which glyph outlines to use; pdf-lib's embedFont(StandardFonts.Helvetica) adds one of the 14 fonts every PDF-compliant reader is guaranteed to support, without embedding a full font file. drawText then appends new operators to the page's content stream at the x/y coordinates you specify — computed here from page.getWidth()/getHeight() minus a fixed margin — so the number becomes indistinguishable, structurally, from text that was in the original document.

A real scenario: preparing a court filing or academic thesis

Court rules and university thesis guides are two of the most common places numbering requirements show up as hard rejection criteria rather than suggestions — a filing might require the case number and a running page count in the bottom-right corner of every page starting after the caption, and a graduate school might mandate lowercase Roman numerals through the front matter switching to Arabic numerals from the introduction onward. In both cases the source document (often assembled from several Word files or exported chapter-by-chapter from LaTeX) frequently arrives at the final PDF stage with numbering missing, inconsistent, or simply wrong. Because the stamping here works on the finished PDF rather than the source files, it lets you fix numbering as the very last step, after every chapter or exhibit has already been merged, split, and finalized — without re-exporting anything upstream.

Sources & references

Authoritative references behind the math, constants, and tables on this page. Verified by Buğra Sözeri on the dates shown and re-checked at every deploy.