Yes, you can stamp a header and footer on every page of a PDF in your browser using the Header Footer PDF tool, which lets you add one optional centered header line and one optional centered footer line to every structural page of a local PDF without installing software or sending the file to a server. The source document opens directly in your browser tab, the expanded text is drawn on each page using an embedded standard Helvetica font, and a new PDF is serialized and offered for download, keeping the original filename base and adding -header-footer.pdf. Two lowercase tokens, {page} and {pages}, support simple numbering, so a footer that reads Page {page} of {pages} becomes Page 2 of 5 on the second page of a five-page document, and replacement is deterministic everywhere those exact lowercase tokens appear.

Browser-based PDF stamping works because modern JavaScript libraries can parse a PDF's structural page boxes, draw text with a standard font, and serialize the result back to a downloadable file without a round trip to a backend. The trade-off is that the tool uses an embedded standard font that supports a practical Latin character set rather than a full typography stack, and it draws inside the existing page box rather than reflowing body content. That makes the workflow fast and predictable for centered labels, confidentiality notices, filenames, revision tags, and page numbering, and it sets a clear boundary for jobs that need custom fonts, multilingual branding, or precise typography.

can i use header footer add header footer to pdf in my browser
PDF Header and Footer Stamp: Tokens, Margins, and Limits

What the browser-based tool does and doesn't do

Before you start, it helps to know exactly what the tool stamps and what it leaves alone, because several assumptions about "add a header and footer" don't apply to a single-line browser stamper.

What it does:

  • Adds one optional header line and one optional footer line to every structural page of the source PDF.
  • Horizontally centers each line based on the real measured width of the text in the embedded standard Helvetica font.
  • Expands {page} to the current one-based page number and {pages} to the total structural page count.
  • Preserves the source page boxes, page order, existing visible content, and original page count.
  • Writes the new text as additional PDF content so it appears in any PDF viewer, not just as a viewer-only overlay.

What it does not do:

  • Create multi-line headers, images, hyperlinks, or rich typography.
  • Support different odd and even content, section-specific numbering, or Bates numbering.
  • Offer a cover-page exclusion, a starting-number offset, or Roman-numeral mode.
  • Read the document's language, move body content, or carve out white space around the new text.
  • Substitute fonts silently when a glyph is missing; failure is shown instead.

The workflow is short on purpose. Open the tool, choose a local file, fill in one or both text fields, set two numeric controls, and download.

  1. Choose a local PDF that is non-empty and no larger than 25 MiB. Encrypted, damaged, oversized, or incorrectly labeled files produce a visible error and are not bypassed.
  2. Enter your header text, footer text, or both in the corresponding fields. Each text field is trimmed and limited to 120 Unicode characters. Other brace text is left unchanged.
  3. Optionally include the tokens {page} and {pages} for numbering, for example Confidential — Page {page} of {pages}.
  4. Set the font size to a whole number between 6 and 36 points and the edge margin to a whole number between 0 and 200 points.
  5. Select Add header and footer. The browser opens the source, draws the expanded text on each page, and prepares the new PDF.
  6. Download the new file. The download keeps the source filename base and adds -header-footer.pdf. Changing any setting revokes the previous download so it cannot be mistaken for the current configuration.

How page numbering with {page} and {pages} works

The two lowercase tokens are the only dynamic values the tool expands. {page} becomes the current one-based page number on the page where the text is drawn, and {pages} becomes the total structural page count of the source document before any text is added. Replacement is deterministic and applies everywhere the exact lowercase token appears, which means spelling and capitalization matter: {Page} or {PAGES} would be left as literal text.

Because the total reflects the source before stamping, the numbering always begins at one and the total always matches the original page count, even if a header or footer would push a page visually past its bounds. A footer such as Page {page} of {pages} on page two of a five-page document will render as Page 2 of 5. The same footer on page five renders as Page 5 of 5. There is no offset and no Roman-numeral mode, so if you need either, a desktop publishing application with section-aware numbering is the right tool.

Settings, limits, and what they mean

The tool exposes a small set of numeric controls with hard boundaries. The values below are the officially defined limits; staying inside them keeps the output predictable.

SettingAccepted valuesEffect
Font sizeWhole numbers, 6 to 36 pointsControls the size of both the header and footer line. If a line would exceed the usable page width, the tool reduces its font size one point at a time down to a 6-point floor.
Edge marginWhole numbers, 0 to 200 pointsHeader text is positioned below the top edge by this margin plus the requested font size; footer text begins above the bottom edge by this margin.
Header text lengthUp to 120 Unicode characters after trimmingLimits the centered line so the tool can reliably measure it and shrink the font if needed.
Footer text lengthUp to 120 Unicode characters after trimmingSame limit, applied independently to the footer field.
Source file sizeNon-empty PDFs up to 25 MiBLarger, encrypted, damaged, or unsupported files produce a visible error rather than a partial result.

A few behaviors follow directly from those limits. The tool does not stretch, wrap, or silently remove text; when a line is too wide for the usable page width, it shrinks the font one point at a time down to the 6-point floor. Very narrow pages or excessive margins can still leave little usable space, so the result should be inspected before distribution. Because the new text is drawn inside the existing page box, body content already near the top or bottom edge can overlap the chosen line; the tool does not detect safe margins or move existing content.

Privacy: where the work happens

The source and generated bytes stay on your device. Loading the PDF, embedding the standard Helvetica font, drawing the expanded text, saving the serialized file, and creating the download all run locally in the browser. Nothing is uploaded to a server, which means the workflow is appropriate for documents with confidentiality notices, internal revisions, or filenames that should not leave your machine. The standard Helvetica font covers a practical Latin character set, but it does not support every writing system or emoji; if the embedded font cannot encode the entered text, file creation fails visibly instead of claiming success with missing glyphs. For multilingual branding, custom typography, or licensed fonts, a desktop publishing application that can embed the required font is the safer choice.

A stale download cannot replace a newer configuration, because changing any setting revokes the previous download link and prevents it from being mistaken for the current text or font choice. That makes it easy to verify the final file before sharing: open the downloaded PDF, confirm the centering, check the first and last page, and confirm that the {page} and {pages} tokens rendered as numbers rather than literal braces.

When this browser stamper fits, and when it doesn't

The tool is designed for a specific kind of job: a single centered label or a simple page-number line, applied uniformly, on a document that already has comfortable margins. That covers confidentiality notices, internal filenames, revision tags like Draft v3 — Page {page} of {pages}, and any case where a private client-side workflow matters more than typographic flourish.

It is the wrong choice when you need section-aware numbering, different odd and even pages, a Roman-numeral front matter followed by Arabic numbering, a cover page without a footer, an image logo instead of text, a hyperlink in the header, or multilingual glyphs beyond the practical Latin set. None of those features are part of the tool by design, and trying to coax them out of the single-line, centered, uniformly applied model will only produce confusing output. In those cases, a desktop publishing application that can embed a licensed font and apply section-specific page logic is the appropriate next step.

Related reading: Set a Size Limit and Split a PDF Into Parts Under It.

Related reading: Does a Header Footer PDF Tool Make Room for the Text?.