PDF Add Page Numbers

Upload a PDF, pick one of the 9 grid positions then a format template. Adjust the start page and color as needed and your contract, report, or textbook is numbered in seconds.

Related

What is a PDF page number?

A PDF page number is a page-number marker placed at a fixed location on a PDF page. Unlike the physical page index, it is annotation or text content overlaid on the page, commonly rendered as 'Page X', 'X / Y', '- X -', 'Page X of Y', and so on.

**Why use a dedicated tool?** PDF readers show the current page index in their status bar, but that is not printable and cannot be shared with colleagues. Once you add a PDF page number, it travels with the document whether you print it or copy it.

**Difference from 'page count':** A real page number is 'current page / total pages'. This tool embeds two variables in the format string so it can automatically render expressions like 'Page X of Y'.

**Core parameters:** start page (1 or custom), position (one of the 3×3 grid positions), format (Page X / X of Y / X / Y / - X -), font (SourceHanSans), color (HEX).

**Typical scenarios:** contracts that need auto numbering before binding, long reports prepared for print, textbooks that need unified chapter numbering.

Use Cases

  • Contracts that need auto-generated page numbers before binding
  • Long reports prepared for print, where specific pages must be referenced
  • Textbooks that need unified chapter numbering
  • PDFs converted from a PPT, where numbers help reference slides during discussion
  • Academic papers and scholarly materials that need page numbers for review
  • Project documentation that benefits from page numbers for cross-references

How to Use

  1. Upload the PDF you want to number
  2. Pick the page-number position (e.g. bottom-left / bottom-center / bottom-right)
  3. Set the format string, start page, font size, and color
  4. Click generate page numbers and download the PDF

Features

  • 9 position layouts: 3×3 grid (top-left / top-center / top-right / middle-left / center / middle-right / bottom-left / bottom-center / bottom-right)
  • 4 format templates: built-in 'plain digit', 'Page N', 'N / P', and 'custom'
  • Custom start page: set to 1 or any number (common for contract covers and book chapters)
  • Custom format strings: {n} and {p} placeholders, with optional prefix and suffix
  • Optional page range: all pages / custom start-end range
  • 3 margin presets: narrow (15px) / recommended (30px) / wide (50px)
  • Adjustable font color: built-in CJK font (SourceHanSans) plus HEX color picker
  • Fully client-side processing: pdf-lib runs in the browser, files are never uploaded

PDF Page Numbers vs Word Auto Page Numbers vs Manual Printing

There are three approaches to adding page numbers to a PDF. This tool follows the 'add after the fact' model, the most common way to handle an existing PDF. Identify your scenario first, then pick the path that fits best.

PDF Page Numbers vs Word/Pages Auto Numbers vs Acrobat Editing: How to Choose?

All three approaches can add page numbers to a document, but the trade-offs and use cases are completely different.

MethodBest ForEffortRecommendation
This Tool PDF Page NumbersYou already have a PDF file (scan, contract, report) and need permanent page numbersUpload PDF → pick position and format → download, done in seconds✅ First choice
Word/Pages Auto Page NumbersThe source is still in Word/Pages/Excel and you can insert numbers during editingOpen the source and use Insert → Page Number to set position and format⚠️ Only when the source is easy to access
Adobe Acrobat EditingComplex numbering logic required (chapter-based numbering, mixed Roman + Arabic digits)Requires a paid Acrobat Pro license and a complex workflow⚠️ Only for enterprise needs

Our 4 Format Templates Compared

Four format templates cover most document types. Pick by document purpose for the fastest result.

Format TemplateSample OutputTypical Use
{n}1, 2, 3, ...Plain digits, clean documents
Page {n}Page 1English documents, contracts
Page {n} of {p}Page 5 of 30Academic papers, long reports
{n} / {p}5 / 30Tech docs, English reports

Best Practices

Pick position first, then format, to avoid going back and forth

The page-number flow is 'pick position → pick format → set start page → pick color → download'. **Once the position is wrong, every page inherits the mistake**. Decide where to place the number first (bottom-center is common), then pick the format (e.g. English 'Page N' or 'N / P'). **Don't switch formats as you go**; every change re-renders all pages. For English documents try the defaults 'bottom-center + Page N + black + start 1' first, then tweak other parameters.

When start page is 1 the cover counts as page 1; do not confuse page numbers with physical pages

**The page-number start page is not the PDF physical-page index**. In this tool 'start page' is the digit shown in the page-number text, while the PDF 'physical page' is the file's page position (counted from 1). Take a 5-page contract: physical 1 = cover, 2 = TOC, 3-5 = body. **To make the body start at 1**: keep 'start page = 1' but set a 'custom range' to 3-5, or regenerate from Word. If you want cover = 1, TOC = 2, body = 3: keep default apply-all + start page 1. **A wrong call makes reviewers misread pages**.

Use {n} and {p} placeholders in custom format strings, not {page} or {total}

This tool's custom format strings only recognize two placeholders: **`{n}` is the current page number, `{p}` is the total page count**. Other placeholders such as `{page}`, `{total}`, `{number}`, `{count}` will be rendered as literal text and not substituted. Common examples: 'Page {n} of {p}', 'Page {n} / {p}', '- {n} -'. **Preview the format string in the settings panel before downloading** the PDF, so you do not have to redo it after discovering a mistake.

Confirm SourceHanSans is loaded for CJK documents, otherwise page numbers become tofu boxes

This tool embeds SourceHanSans (SourceHanSansCN-Normal.ttf) by default to render Chinese page numbers. **SourceHanSans must load from the site path `/SourceHanSansCN-Normal.ttf`**. If the network is offline, cross-origin blocked, or the deployment path is wrong, it silently falls back to Helvetica English rendering and **Chinese page numbers all turn into tofu boxes**. Fix: 1) confirm the browser can fetch `/SourceHanSansCN-Normal.ttf`; 2) open the PDF immediately after download to check that Chinese numbers render as text, not boxes—do not just trust the success toast. If offline is confirmed, finish numbering first and download, or switch to a pure-digit format like `{n}` to sidestep CJK rendering.

When numbering only part of the PDF, use the custom range, do not split and re-upload

'Number only the body and skip the cover and TOC' is a common need. **Do not split the PDF into halves before uploading to this tool**—splitting then merging can lose fonts, lose links, and break bookmarks. **The right approach**: pick 'Custom' under 'Page range' and enter 'start = 3', 'end = 30' (matching the body's physical pages). The tool processes only that range, leaving the cover and TOC untouched. One operation does it all, far more efficient than splitting and merging.

Open the file right after download to verify the numbers, do not just trust the 'success' toast

The tool will show an 'Added successfully' message, but **that does not guarantee the numbers are correct**. **Open the file in a browser or PDF reader immediately** after download and check three things: 1) the CJK numbers render as text (not boxes); 2) the start page matches your expectation (not starting from 0 or 2); 3) the position is correct (not drifting into the middle of the page). **If something looks off, adjust parameters and regenerate right away**—that is cheaper than having the other party flag the mistake later. Do not skip this step.

To replace existing numbers in a PDF, remove the old ones first, then re-add

This tool **does not detect or remove page numbers already present in a PDF**. If you want to swap an existing format (e.g. change 'Page 5' to '5 / 30'), **adding new numbers on top will overlap the old ones**—very ugly. Workflow: first use `/pdf/edit/` to manually delete the old numbers in the source PDF, then use this tool to add the new ones. Or accept the old numbers and run the output through `/pdf/compress/` (compression may not strip them). **There is no overwrite-replace mode**; cleanup must happen in the editing step first.

FAQ

What formats does the auto PDF page-number tool support?

The tool ships with 4 format templates: plain digits, 'Page N', 'N / P', and a custom string. You can also define a custom format string using {n} for the current page and {p} for the total page count.

Can the start page be something other than 1?

Yes. For example, contracts often use 'cover = page 1'. The tool accepts any start number (default 1, but 0, 5, 10, etc. all work). To start counting from somewhere other than the cover, just set 'Start page' to the desired number.

How do I change the page-number color?

Click the color picker (black square icon) in the page-number settings panel. A HEX picker opens where you can type or drag to pick a color. The color is applied to every page number.

Is a PDF page number text or an image?

It is text. This tool uses pdf-lib drawText to render the page number as vector text inside the PDF content stream, so it is selectable, copyable, and searchable, and adds only a handful of bytes per page.

Does a PDF page number affect printing?

Yes. This tool embeds the number into the PDF content stream, so it prints together with the document. If you need it hidden when printing, combine it with the 'forbid printing' permission from /pdf/encrypt/.

Why does the start page differ from the page count in my PDF reader?

The page number shown in a PDF reader's bottom bar is the physical page index (counted from 1) and cannot be modified. This tool's page number is text overlaid on the content, counted independently based on your 'start page' setting. Both coexist without conflict.

How do I add page numbers to odd or even pages only?

The tool does not currently expose an odd/even toggle; it applies the number uniformly. To target only some pages, switch to 'Custom page range' mode and enter the start and end pages manually—the tool processes only that range.

Does adding page numbers upload the PDF to a server?

This tool runs in the browser on top of pdf-lib. The file never leaves your machine and is cleared when you refresh or close the page.

Troubleshooting

Page numbers render as tofu boxes or mojibake

This tool embeds SourceHanSans (CJK) + Helvetica (Latin) by default. If Chinese characters appear as tofu boxes, the font failed to load and the engine fell back to Helvetica. Reopen the page in the latest Chrome, Firefox, or Edge. SourceHanSans (SourceHanSansCN-Normal.ttf) must load from the site path /SourceHanSansCN-Normal.ttf. If the network is offline the font cannot load and the engine falls back to the Latin font.

Page-number position is off

Check the margin preset: the default is 'Recommended' (30px from the edge). If it feels too close to the edge or too close to the center, switch to 'Narrow' or 'Wide'. The tool does not expose a manual px input.

Range is wrong when numbering only part of the PDF

Check that the custom range 'start page' and 'end page' fit inside the actual PDF page count. The page range uses PDF physical-page indexing (counted from 1), not the start-page numbering.

The recipient cannot see the added page numbers

The recipient may be using an outdated PDF reader. Ask them to upgrade to the latest Adobe Reader, Chrome, or Foxit, or re-export with this tool (confirm the downloaded file is larger than the original).

CJK characters become tofu boxes or question marks

The tool first tries to embed SourceHanSans (SourceHanSansCN-Normal.ttf). If the browser cannot reach /SourceHanSansCN-Normal.ttf (offline, cross-origin, deployment issue), it falls back to Helvetica Latin rendering and CJK text fails. Check the network environment or switch to a CJK-capable PDF reader.

Glossary

PDF page-number start page
PDFs default to numbering from page 1. This tool supports a custom start page (1 or any number), which is handy for contracts where the cover is page 0 and the body starts at page 1.
Format string / Pattern
Text containing placeholders. For example, 'Page {n} of {p}' is auto-substituted at render time. This tool supports two placeholders: {n} (current page) and {p} (total pages).
Embedded font vs system font
Embedded fonts travel with the PDF and render consistently across platforms; system fonts depend on the reader side and may be substituted. This tool embeds SourceHanSans by default so characters survive cross-platform reading.
pdf-lib drawText
The page-text drawing API exposed by pdf-lib. This tool uses drawText to write the page-number text directly into the PDF page content stream, not as an annotation or XObject.
RGB color
PDF page-number color. This tool converts a HEX picker value into pdf-lib's 0-1 rgb range before passing it in.
Page range
This tool supports two modes: 'All pages' and 'Custom start-end range', useful when you only want to number the body and skip the cover or TOC.

PDF Page-Number Format Templates

Pick a template that fits or define your own custom string.

Format TemplateSample OutputTypical Use
{n}1, 2, 3, ...Plain digits
Page {n}Page 1English documents
Page {n} of {p}Page 5 of 30Contracts / academic
{n} / {p}5 / 30Tech reports
- {n} -- 5 -Concise markers
1-{n}1-5, 1-6Chapter numbering (manual prefix)

9 Page-Number Position Layouts

The 3×3 grid covers most scenarios—pick by use case.

PositionTypical Scenario
Bottom-centerUniversal footer (most common)
Bottom-rightPapers and formal documents
Bottom-leftLeft-aligned layouts, published books
CenterPresentation slides, emphasis on numbers
Top-center / Top-left / Top-rightHeader position (academic, reports)

Recommended Font and Color Combinations

Pick combinations by document type for better readability.

Document TypeFont (auto)Recommended Color
Contract / academicSourceHanSans (CJK) + Helvetica (Latin)Dark gray #555
Teaching slides converted to PDFSourceHanSansBlack #000
Marketing brochures / reportsSourceHanSansMedium gray #888
Scanned PDF top-up numberingSourceHanSansBlack #000
Large page numbers for presentationsSourceHanSansBrand color (custom)

Authoritative References