Add Page Numbers

Stamp customizable header or footer page numbers across documents.

100% Client-Side • 100% Free

Add Page Numbers to PDF

Stamp customizable page numbering across headers or footers in pure client-side vector quality

🔢

Drop PDF here or browse files

Numbering is stamped directly into PDF document streams with vector sharpness

In-Depth Technical Guide•8 min read•2RUN Engineering Team
100% Client-Side • Zero Upload

Add Page Numbers to PDF Online: Custom Pagination, Bates Numbering & In-Browser PDF-Lib

⚡How to Add Page Numbers to a PDF in 4 Simple Steps

1

1. Upload Your Target PDF Document

Select or drag your unnumbered PDF into the browser workspace. The file is mapped into volatile memory with zero server uploads.

2

2. Choose Numbering Format & Style

Select between Arabic numerals (1, 2, 3), 'Page X of Y', Roman numerals (i, ii, iii), or legal Bates stamping with custom prefixes.

3

3. Configure Position, Margins & Exclusions

Pick your anchor position (e.g., bottom-center or alternating outer corners), set margin offsets, and choose to skip the cover page.

4

4. Apply Pagination and Download

Click 'Add Page Numbers' to inject vector typography into page content streams. Download your paginated PDF immediately.

In modern legal proceedings, academic publishing, corporate governance, and formal business reporting, unnumbered PDF documents create severe administrative chaos. When assembling complex contracts, multi-source financial audits, research dissertations, or litigation exhibits, referencing specific clauses or cross-examining exhibits is virtually impossible without clear, unambiguous page numbering. Furthermore, documents merged from multiple disparate sources frequently contain mismatched, conflicting, or non-consecutive page numbers baked into disparate page corners, causing confusion during board meetings and court hearings.

Our browser-native Add Page Numbers tool provides comprehensive, publication-grade document pagination directly inside your web browser. Featuring dynamic numbering formats (Arabic numerals, Roman numerals, Bates numbering for litigation, and 'Page X of Y' pagination), granular positioning controls (nine-point anchor grids with customizable margin offsets), cover page skipping, and font customization, you can establish flawless document pagination in seconds. Operating with 100% client-side privacy via WebAssembly and PDF-Lib, your confidential corporate records never touch external cloud servers.

Read the full technical guide

Pagination Architectures: Visual Drawing Operators vs. /PageLabels Dictionaries

Under the ISO 32000 PDF specification, pagination can be implemented in two distinct ways: through visual text operators injected into page content streams, and through digital logical page labels defined in the document root's `/PageLabels` number tree dictionary.

Visual page numbers are rendered directly into the page's `/Contents` stream using font dictionaries and text positioning operators (`BT`, `Tf`, `Tm`, `Tj`, `ET`). These numbers are permanently stamped onto the physical and digital page canvas, ensuring they are visible when printed on paper, displayed in mobile viewers, or projected in boardrooms.

Digital page labels (`/PageLabels`), by contrast, dictate how PDF reader software displays page indices in the software's navigation toolbar (e.g., displaying `Cover`, `i`, `ii`, `1`, `2`). Amateur tools only implement one or the other. Our tool provides comprehensive visual stamping while respecting underlying document geometries, ensuring that your physical page numbers align perfectly with human reading expectations.

Nine-Point Spatial Alignment & MediaBox Margin Calculations

Proper page number placement requires precise spatial geometry. PDF pages do not use a standard top-left pixel grid; they utilize a Cartesian coordinate system with the mathematical origin `(0, 0)` located at the bottom-left corner of the page `/MediaBox`, measured in typographic points (1/72 of an inch).

Our tool offers a flexible nine-point anchor grid: Top-Left, Top-Center, Top-Right, Middle-Left, Middle-Center, Middle-Right, Bottom-Left, Bottom-Center, and Bottom-Right. Furthermore, professional publishing requires alternating gutter offsets: on odd (recto) pages, page numbers typically appear on the outer right edge, whereas on even (verso) pages, they appear on the outer left edge to accommodate spiral or thermal book binding. Our engine calculates bounding boxes and margin offsets dynamically across every sheet, even when documents contain mixed orientations (such as portrait text pages mixed with landscape financial spreadsheets).

Bates Numbering for Legal Discovery and Corporate Litigation

In legal discovery, corporate litigation, and regulatory compliance investigations, standard page numbering is insufficient. Attorneys and compliance officers require Bates Numbering (also known as Bates Stamping)—a specialized alphanumeric labeling system used to uniquely identify every single page in a legal production.

A Bates stamp typically consists of an alphanumeric prefix representing the case or party (e.g., `ACME-CORP-`), followed by a zero-padded sequential serial number (e.g., `00004521`). Our tool features dedicated Bates stamping modes, allowing legal teams to set custom prefixes, suffixes, start numbers, and padding lengths (from 3 to 10 digits). The Bates identifiers are stamped with indelible vector precision, creating an unassailable audit trail for trial exhibits.

Typography, Font Embedding & Glyph Metrics

Rendering crisp, professional page numbers requires careful typographic handling. If software naively references system fonts without embedding them into the PDF binary, the document will fail to render properly or substitute unsightly generic fonts when opened on other computers.

Our client-side engine embeds standard PostScript Type 1 font programs (such as Helvetica, Times-Roman, and Courier) or custom TrueType fonts directly into each page's `/Resources` dictionary. It measures exact character advance widths (`wx` metrics) to compute precise text centering and right-alignment offsets, ensuring that dynamic strings like 'Page 12 of 150' remain visually balanced without clipping against page margins.

Client-Side Zero-Knowledge Privacy for Sensitive Documents

Legal briefs, patent applications, executive salary reports, and clinical trial dossiers are frequently paginated immediately before distribution. Uploading these proprietary files to cloud-based PDF websites creates unacceptable security hazards, exposing confidential work product to third-party data breaches.

Our Add Page Numbers tool is engineered on a strictly client-side architecture. Utilizing WebAssembly, Web Workers, and PDF-Lib, the entire pagination pipeline executes within your local browser sandbox. Your files are never transmitted across the network, ensuring complete compliance with internal data governance policies and international privacy frameworks like GDPR and HIPAA.

Excluding Cover Pages and Custom Sequence Starts

Professional publications rarely number the front cover or table of contents with standard Arabic numerals. A corporate report may require leaving the cover page completely blank, numbering the executive summary with Roman numerals (`i`, `ii`), and beginning Arabic numeral `1` on page 3 or 4.

Our tool allows you to specify exact page ranges to paginate, omit front cover sheets with a single click, and designate a custom starting number. You can effortlessly start numbering at page 5 with number 1, or continue numbering from a previous document volume seamlessly.

💡Pro Tips for Professional Document Pagination

  • •Use 'Page X of Y' pagination for contracts and legal agreements; this ensures recipients immediately recognize if any sheets are missing from the package.
  • •When preparing documents for double-sided commercial printing, choose 'Alternating Outer Corners' so page numbers always face the outside edge of the bound book.
  • •If your document contains mixed page orientations, our engine automatically calculates coordinates per page, placing numbers correctly on both portrait and landscape sheets.
  • •Set a 36-point (0.5 inch) margin from the bottom edge to ensure numbers remain well within the printable printable area of desktop laser printers.
  • •Combine pagination with our Header & Footer tool if you also need to stamp confidentiality notices or chapter headings alongside page numbers.

🛡️PDF-Lib Content Stream Injection & Coordinate Math

Our pagination engine executes in a sandboxed Web Worker utilizing WebAssembly-compiled PDF-Lib. For each target page, the engine reads the `/MediaBox` and `/CropBox` arrays to determine exact dimensions. It loads the requested font dictionary (e.g. Standard Helvetica or custom embedded TTF), measures text advance widths, and calculates the affine translation matrix mapping the text baseline to the requested margin offset. The engine wraps the operation in isolated graphics state operators (`q ... Q`), appends the `BT` (begin text), `Tf` (set font/size), `Tm` (text matrix), and `Tj` (show text) operators to the page `/Contents` stream array, and updates cross-reference offsets with zero quality loss or server communication.

Stack: WebAssembly • Multi-threaded Web Workers • HTML5 Canvas API

Privacy: Files never leave your device or touch a cloud buffer; analytics run only with your consent.

Why choose client-side browser tools?

When you compress an image or merge a PDF on 2run tools, the code executes inside your browser tab using WebAssembly and Web Workers. We never stream your bytes to a remote cloud server. Your private financial reports, personal photos, and legal agreements never leave your device.

Total PrivacyIn-Browser
Instant ProcessingFast RAM
Truly UnlimitedZero Limits

Frequently Asked Questions About Adding Page Numbers to PDFs

Can I skip numbering on the first page or cover sheet?▾

Yes! You can toggle 'Skip First Page' with a single click, or define custom page ranges (e.g. `2-50`) so cover sheets, title pages, and table of contents remain unnumbered.

Can I start numbering from a number other than 1?▾

Yes. You can specify any positive integer as your starting number (e.g., starting at 45 for an appendix or second volume of a report).

Does adding page numbers alter the existing text or images in my PDF?▾

No! Our tool performs non-destructive vector overlay injection. Your original document text, fonts, vector paths, and high-resolution images remain completely untouched and uncompressed.

What is Bates numbering and how does it work?▾

Bates numbering is an alphanumeric indexing method used by attorneys to label litigation documents. It applies a standardized prefix (like 'PLAINTIFF-') followed by sequential padded numbers (like '000102') to uniquely identify every sheet.

How does the tool handle documents with mixed portrait and landscape pages?▾

Our engine inspects the `/MediaBox` and `/Rotate` keys of every individual page, recalculating margin coordinates dynamically so page numbers appear in the correct visual corner on both portrait and landscape pages.

Are my confidential files uploaded to any external server?▾

Never. All parsing, coordinate calculation, font embedding, and file re-serialization happen 100% locally in your web browser. Your confidential files never leave your computer.

Can I customize the font, size, and color of the page numbers?▾

Yes! You can choose from classic font families (Helvetica, Times, Courier), adjust font sizes (e.g. 9pt to 14pt), and select text colors (black, slate gray, blue, red) to match your document branding.

Will the added page numbers show up when printing the document?▾

Yes. Because page numbers are injected directly into the standard PDF content stream, they are permanent vector elements that render and print crisply on any printer or PDF viewer.

Sites Loading Under 0.8s
100/100 Lighthouse web engineering
Audit
Dev Arm for Design Agencies
White-label • Bilateral NDA
Partner
Technical SEO by Code
Deep Schema • Zero waste
Scale SEO
Custom Web Apps & SaaS
100% code ownership • Edge scale
Build
Turn Traffic into Sales
+34% sales lift • Fix bottlenecks
Audit