📑

Add Header & Footer to PDF

Stamp custom text on the top and bottom of every PDF page. Use {n} for page number and {total} for total pages — all processing stays in your browser.

Your stamped PDF appears here

Upload a PDF, type your header and/or footer text, then click Apply & Download. The new header-footer.pdf downloads straight to your device — nothing is uploaded.

Advertisement
About this PDF header & footer tool

Stamp a line of text along the top and bottom of every page in a PDF — a running header, a footer, or both at once. Type your text, choose a font size and margin, and the tool draws it centered on each page using the standard Helvetica font, then hands you a fresh PDF to download.

The {n} and {total} placeholders turn static text into dynamic page numbering: {n} becomes the current page (1, 2, 3…) and {total} becomes the page count, so "Page {n} of {total}" reads "Page 1 of 12" on the first page. People use it to:

Everything runs 100% in-browser with pdf-lib — the PDF is read into memory, the text is drawn locally, and the result is downloaded straight from your device. The file is never uploaded to a server, so even sensitive documents stay private.

How to use
  1. Drop a PDF onto the box, or click to browse and select one — it loads locally with pdf-lib.
  2. Type your header text (drawn top-center) and/or footer text (drawn bottom-center). Leave either blank to skip it.
  3. Use the {n} and {total} placeholders for live page numbers, e.g. Page {n} of {total}.
  4. Adjust the font size (pt) and margin from edge (pt) to control how big the text is and how far it sits from the page edge.
  5. Click Apply & Download — every page gets the same Helvetica text and the new PDF saves as header-footer.pdf.
FAQ

{n} is replaced with the current page number, counting from 1, and {total} is replaced with the total number of pages. Combine them in any text, for example "Page {n} of {total}" renders as "Page 1 of 12" on the first page of a 12-page file.

Any combination. The header field draws text at the top-center of each page and the footer field draws at the bottom-center. Fill in one, the other, or both — whichever field you leave blank is simply skipped.

Both the header and footer are horizontally centered on the page. The "Margin from edge" value sets how many points the text sits from the top edge (header) or bottom edge (footer), so a larger margin pushes the text further inward.

The text is drawn in standard Helvetica in black, centered on the page — those are fixed. You can adjust the font size in points (6–72) and the margin from the edge. Custom fonts, colors, and left/right alignment are not available in this tool.

No — the header and footer are applied to every page of the PDF. There is no per-page or page-range control here. If you need that, split the PDF first, stamp only the pages you want, then merge them back together.

You get a new PDF saved as header-footer.pdf with your text drawn onto every page. The original document is untouched — the existing content stays in place and your header/footer text is layered on top of each page.

No. pdf-lib reads the file into memory, draws the text, and downloads the result entirely on your device. The PDF and the text you type are never uploaded, stored, or logged.