Runs in your browser with pdf.js and pdf-lib
Add Page Numbers to PDF — where, how and from which page you choose
Pick a position, the pages to number, the first number and a pattern like "Page 1 of 20". Every page shows the result live, large enough to read, before you save.
- PDF files aren't uploaded to our server
- Live preview on every page
- 1 2 3, i ii iii or A B C
- Free, no account
Number your pages, checked page by page
Add a PDF, choose the settings, and watch every page update before you save.
Drop your PDF here
or browse — one PDF, any number of pages
Pages with their numbers
The preview updates as you change settings. Click a page to see it full size.
What this tool actually does
A page number is a small detail — a wrong one is obvious
Anyone can put "1" in a corner. The work is making it sit where it belongs, count what it should count, and look like part of the document.
Added as text, on top of each page
A thesis needs the cover unnumbered and Roman numerals on the front matter. A contract needs every page numbered so "see page 12" means one thing. A report wants "Page 3 of 20" so readers know nothing is missing.
pdf-lib writes each number as a small line of real text on the pages you choose; what's already on the page stays as it was, and bookmarks and links are kept. pdf.js draws the previews. Both run in your browser tab, so your PDF isn't uploaded to our server.
What you can set
Position and margin
Top or bottom, left, center or right, and the distance from the edge in points.
Which pages, starting from which number
All pages, all but the cover, or typed pages like 3-12; and the number the count starts at.
Number style and text
1 2 3, i ii iii, I II III, a b c or A B C, inside a pattern such as "Page 1 of 20" or your own wording.
Typography
Helvetica, Times or Courier in four sizes, any color, bold or italic, and opacity.
How to add page numbers to a PDF in four steps
Set the position and the pages first; it's quicker to check placement once than after every font change.
Add your PDF
Drop a PDF onto the upload area, or click Select PDF. Every page appears with a number already in place, using the default settings.
Previews draw as you scroll, so long documents open quickly.
Choose where and which pages
- Click a spot on the small page diagram and set the margin.
- All pages, Skip first page, or typed pages like 3-12.
- Set the first number if the count shouldn't start at 1.
Style it, then check
Pick a pattern, number style, font, size and color. Each card shows the exact text it will get; open a page full size to check it clears your footer.
Reset settings brings back the defaults.
Save and download
Click Add page numbers. Page through the saved file, which is drawn from the new PDF itself, rename it if you like, and download.
From unnumbered draft to a document you can cite
The cover stays clean; the content pages count from 1.
Settings for common documents
A starting point for documents people number most often. Always check your own guidelines.
| Document | What matters | Settings to try |
|---|---|---|
| Thesis or dissertation | Front matter in Roman numerals, the body from 1. | Number the front pages with i, ii, iii; save; then number the body pages with Pages… and First number 1. |
| Report with a cover | Cover without a number, but pages match their physical position. | Skip first page and First number 2. |
| Contract or agreement | Every page counted, so a missing page is noticed. | All pages, "Page 1 of 20", bottom center. |
| Financial statements | Reviewers can confirm the set is complete. | "1 / 20" at bottom right, Medium size. |
| Legal exhibits | Exhibits labelled with letters. | A, B, C with your own text, e.g. "Exhibit n". |
| Slides exported to PDF | Numbers that don't collide with slide footers. | Top right, Small size, 60% opacity. |
| Second part of a longer document | Numbering continues from the first file. | First number set to the next page number, e.g. 41. |
| Printed booklet | Numbers easy to find when flicking through pages. | Bottom center with a Large margin, so trimming doesn't cut them. |
Numbering rules
How the text is worked out
Four rules that explain every number you'll see on the preview.
n and N in the text
n becomes the page's number and N the last number. They're only replaced when they stand alone, so words like "Section" are safe: Section 2 – page n stays readable.
Only chosen pages count
With 3-12, page 3 gets the first number and page 12 the last; other pages get none. First number 1 and ten pages give "Page 1 of 10" to "Page 10 of 10".
Roman numerals and letters
i, ii, iii is the usual style for prefaces and contents pages. Letters go a … z, aa, ab after 26 pages.
Mistakes are named, not ignored
A reversed range like 10-5, a page past the end, or a character the standard PDF fonts can't draw is pointed out, and nothing is saved until it's fixed.
When a number lands somewhere wrong
Identify the problem, then use the matching fix.
Number overlaps footer text
The document already has text in that spot.
Use the other edge or a corner, or raise the margin until the preview shows it clear.
Numbers don't match the physical page
Skipping the cover makes physical page 2 the first numbered page, so it shows 1.
Set First number to 2.
The Text field turns red
The standard PDF fonts only cover Latin letters, digits and common symbols, so scripts like Gujarati or Hindi can't be drawn.
Use Latin letters in the text; the message names the character to change.
Font doesn't match the document
The tool uses the three fonts every PDF reader has built in: Helvetica, Times and Courier.
Pick the closest family: Helvetica for sans-serif text, Times for serif.
Numbers look faint in print
Opacity is below 100%, or the color is light.
Set opacity to 100% and pick a dark color for anything you'll print.
Numbers were added twice
An already-numbered file was numbered again. Numbers are added as text and can't be removed here.
Go back to your original PDF, which this tool never changes, and number that.
A password-protected PDF won't open
Most encrypted PDFs can't be opened by the in-browser PDF libraries.
Remove the password with Unlock PDF, then add the unlocked copy.
Clean page numbers on the first attempt
A working order that avoids a second round.
Check the first and last pages
Open both full size. Long numbers like "Page 100 of 120" are wider than "Page 1", and the last pages show it.
Use "Page n of N" for long documents
Readers see where they are and can tell straight away if a page is missing.
Match the body text
Pick the font family closest to your document and a size slightly smaller than the body text.
Leave room for trimming
For print, keep at least a Medium margin (36 pt, half an inch) so a trimmed page doesn't cut the number.
Keep the unnumbered original
Numbers can't be taken off again here. Keep the original so you can redo it with other settings.
Common questions about page numbers
If something's not covered here, the troubleshooting section above likely has it.
Does this tool upload my PDF to a server?
No. The previews and the numbering both run in your browser with pdf.js and pdf-lib. Your PDF is read on your device and is not uploaded to the AllInOneTools server.
How do I leave the cover page without a number?
Choose Skip first page. Numbering then starts on page 2. If the numbers should match the physical page, so page 2 shows 2, set First number to 2.
Can I number only some pages?
Yes. Choose Pages… and type page numbers or ranges such as 3-12, 15 or 20- for page 20 to the end. Only those pages get a number, and the count runs through them in order.
What do n and N mean in the text?
n is replaced by each page's number and N by the last number, so Page n of N becomes Page 3 of 20. They are only replaced when they stand on their own, so a word like Section is left alone.
Can I use Roman numerals for the front matter?
Yes. Choose i, ii, iii or I, II, III under Numbers as. To number the front matter in Roman numerals and the rest from 1, number the front pages first, save, then open the saved file and number the remaining pages.
Will the numbers be upright on rotated or landscape pages?
Yes. Position and margin are measured on the page as you see it, and the text is turned to match any rotation saved in the page, so it reads the right way up on every page.
Does adding numbers change anything else in the PDF?
No. Each number is added as a line of text on top of the page. The existing content, bookmarks, links and document details are kept, and your original file is not changed.
Build notes
The write-up on numbering PDFs in the browser
Because positioning and drawing run client-side, I wrote a tutorial on building a PDF page numbering tool with JavaScript.
How to Build a PDF Page Numbering Tool Using JavaScript
A step-by-step tutorial on adding page numbers to PDFs client-side with JavaScript.