How-To

How to Add Page Numbers to a PDF for Free: Step-by-Step Guide

· 6 min read

Quick summary: To add page numbers to a PDF for free, open it in LibreOffice Draw, go to Insert → Header and Footer, enable the footer, and insert a page number field. Export as PDF. Alternatively, use Ghostscript with a PostScript script to stamp numbers across every page, or use a free online tool that does it in seconds without any install.

Adding page numbers to a PDF — for a report, a contract, or a thesis — makes navigation and reference much easier. Adobe Acrobat Pro handles this natively, but there are free alternatives that work just as well on every platform. After numbering, upload the final PDF to our free AI PDF reader to summarize or read it hands-free.

How to add page numbers with LibreOffice Draw (free, all platforms)

LibreOffice Draw is the most reliable free desktop tool for adding page numbers to an existing PDF:

  1. Download and install LibreOffice from libreoffice.org (free).
  2. Open LibreOffice Draw (not Writer).
  3. Go to File → Open and select your PDF. LibreOffice imports it as editable pages.
  4. Go to Insert → Header and Footer.
  5. In the dialog, check Footer and check Page Number — this inserts an auto-incrementing number on each page.
  6. Choose alignment (center, left, or right) and click Apply to All.
  7. Export: File → Export as PDF (Ctrl+Shift+S) → keep default settings → click Export.

The exported PDF has page numbers on every page, starting from 1 by default.

To start numbering from a different number (e.g. page 5 for a chapter):

  • Insert → Header and Footer → check “Page Number” → set “Start at” value.

To format the page number (e.g. “Page 1 of 10”):

  • In the footer text field, type “Page ” before the field and ” of ” + total field after. Use Insert → Field → Page Count for the total.

How to add page numbers with Ghostscript (command line)

Ghostscript stamps page numbers on every page via a PostScript script. Create a file called pagenumbers.ps:

/Helvetica findfont 10 scalefont setfont

{
  /PageNumber exch def
  gsave
  0 0 0 setrgbcolor
  297 20 translate
  (Page ) show
  PageNumber 10 string cvs show
  grestore
} bind def

Then run:

gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER \
   -sOutputFile=numbered.pdf \
   pagenumbers.ps input.pdf

The 297 20 translate positions the number (x=297 points from left, y=20 points from bottom — roughly centered at the bottom of a US Letter page). Adjust coordinates to move the number to a different position.

How to add page numbers online (free, no install)

Free browser-based tools can add page numbers to any PDF without sign-up. Search for “add page numbers to PDF free online”:

  1. Upload your PDF.
  2. Choose position (bottom center, bottom right, top center, etc.) and starting number.
  3. Choose font size and margin.
  4. Download the numbered PDF.

Privacy note: Online tools upload your file to a remote server. Avoid them for confidential or legal documents.

How to add page numbers on Mac

macOS does not have a built-in way to add page numbers to an existing PDF. Options:

  • LibreOffice Draw (free download) — best option, see above.
  • Preview — Preview cannot add page numbers automatically. You can manually add a text box with the page number on each page, but this does not auto-increment.
  • Automator + Script — an Automator workflow with a shell action running Ghostscript can batch-number a folder of PDFs.

How to add page numbers on Windows

  • LibreOffice Draw — same method as above, cross-platform.
  • Microsoft Word — if the PDF was originally a Word document, open it in Word (File → Open → the PDF file), add page numbers via Insert → Page Number, then export back to PDF. Note: complex PDF layouts may shift in Word.
  • Ghostscript — available for Windows; the command above works identically.

Page number position guide

PositionUse case
Bottom centerReports, books, academic papers
Bottom rightLegal documents, contracts
Top rightManuscripts, formal letters
Bottom leftLess common; used for two-sided printing

For a professional look, use a consistent 10–11pt font (Helvetica, Arial, or Times) and leave at least 15mm margin from the page edge.

How to number only specific pages

To number pages 3 onwards (skipping a cover page and table of contents):

  1. Extract pages 3–end into a new PDF (see how to extract pages from a PDF for free).
  2. Add page numbers starting from 1 (or 3 if you want to match the original document position).
  3. Merge the unnumbered first pages with the numbered section using a PDF merge tool.

In LibreOffice Draw, you can set the starting page number in Insert → Header and Footer → Start at.

Frequently Asked Questions (FAQ)

Can I add page numbers to a PDF without Adobe Acrobat?

Yes. LibreOffice Draw (free, cross-platform) adds page numbers via Insert → Header and Footer. Ghostscript (free command-line tool) does the same in one command. Free online tools are also available for one-off documents.

How do I add page numbers to a scanned PDF?

A scanned PDF is an image — LibreOffice and Ghostscript add the numbers on top of the image layer, which works fine. The page numbers are text drawn over the page, not extracted from the scan content.

Can I remove page numbers I added?

If the page numbers were added as annotations (text boxes in Preview), select each one and press Delete. If they were baked in via LibreOffice export or Ghostscript, they are part of the page content and cannot be removed without editing the source and re-exporting.

How do I add Roman numeral page numbers (i, ii, iii)?

LibreOffice Draw supports Roman numeral page formatting in Insert → Header and Footer → Page Number Format. In Ghostscript, you need a custom PostScript function to convert integers to Roman numerals — this is complex and most users opt for an online tool for this specific need.

Does adding page numbers change the file size?

Only marginally. Adding a small text footer increases file size by a few kilobytes at most.

Can I add page numbers that say “Page X of Y”?

Yes. In LibreOffice Draw: in the footer text field, type “Page ”, then insert the page number field (Insert → Field → Page Number), then ” of ”, then insert the page count field (Insert → Field → Page Count). The result automatically shows the correct totals on every page.

Upload your PDF and let AI read it

Get an instant summary, ask questions about the content, or translate into another language — all free, no sign-up.

Try the AI PDF Reader