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. 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. 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. 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. 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.
Complementary Tools in this Workflow
Chain these client-side utilities together for high-performance creative workflows.
Add Header & Footer Text
Add title headers, dates, and confidentiality notices to every page.
Convert Entire PDF to B&W
Save printer toner by converting all text and color photos to clean grayscale.
Crop PDF Page Margins
Trim white margins and printer bleed marks from documents.
Resize Pages to A4 / Letter
Standardize irregular page sizes into consistent A4 or US Letter sheets.