A header footer adder for PDF files applies one optional header line and one optional footer line to every page of an existing document and gives you back a new copy. With the Header Footer PDF tool, the source file stays on your device throughout the process — the browser opens the PDF locally, draws the centered text on each page using the embedded standard Helvetica font, and serializes a fresh PDF you can download with the original filename plus a -header-footer.pdf suffix. Header text is positioned below the top edge by your selected edge margin and font size, while footer text begins above the bottom edge by the chosen margin. Both lines are horizontally centered from the real measured text width, and the original page boxes, page order, and visible content remain in place. The new labels are drawn as additional PDF content rather than a viewer overlay, so they remain visible in any reader that opens the resulting file.

header footer adder in pdf
header footer adder in pdf

The tool adds exactly two pieces of text per page: one optional header line and one optional footer line. You can fill in either field or leave it empty, and the tool does not require both. Each field is trimmed and limited to 120 Unicode characters, so very long strings have to be shortened before the file can be created. The text is rendered with the standard Helvetica font that ships with the PDF specification, which keeps output readable but means the tool does not load custom or licensed fonts. If a character cannot be encoded by that font — such as some emoji or scripts outside the practical Latin set — file creation fails visibly instead of substituting missing glyphs silently.

Three controls determine how the lines look on the page: the font size, the edge margin, and the position relative to the top or bottom of the page. Font size accepts whole values from 6 to 36 points. Edge margin accepts whole values from 0 to 200 points from the page edge. The header sits below the top edge by the selected margin plus the requested font size, so a 12-point header with a 24-point margin lands roughly 36 points from the top. The footer sits above the bottom edge by the selected margin, so a 24-point margin lifts the footer 24 points up from the bottom edge of the page.

ControlAccepted rangeNotes
Header text0–120 charactersOptional; trim applied before drawing
Footer text0–120 charactersOptional; trim applied before drawing
Font sizeWhole values 6–36 pointsApplied to both lines
Edge marginWhole values 0–200 pointsHeader sits margin + font size from top; footer sits margin from bottom
Embedded fontStandard Helvetica onlyPer the pdf-lib StandardFonts enumeration
File size limitUp to 25 MiBEncrypted or damaged files produce a visible error

How to add headers and footers to a PDF

The workflow runs entirely in your browser, so nothing is sent to a server. Three settings control the final document: the chosen text in each field, the font size, and the edge margin. Once you change any of those settings, the previous download is revoked so the file you save always matches the most recent configuration. The text drawing itself uses PDFPage.drawText on every structural page of the source document, with the embedded standard font measured for accurate centering.

  1. Choose a local PDF no larger than 25 MiB. Drag the document into the tool or pick it from your file system. The browser opens it locally; encrypted, damaged, oversized, or incorrectly labeled files produce a visible error and cannot be bypassed.
  2. Enter header text, footer text, or both. Leave a field empty if you do not want that position. You can include the tokens {page} and {pages} in either field for live page numbering. Each field is trimmed to 120 characters before drawing.
  3. Set the font size and edge margin. Pick a whole font size between 6 and 36 points and a whole edge margin between 0 and 200 points. The header uses margin plus font size to clear the top edge; the footer uses the margin to clear the bottom edge.
  4. Create the file and download the new PDF. Select the action button to stamp the text on every page. The browser saves a new PDF to your downloads with the source filename base plus -header-footer.pdf appended. Open it locally to confirm the text sits where you want before distributing or printing it.

Reading the {page} and {pages} tokens

Two lowercase placeholders give you automatic page numbers without any setup beyond the text you type. The token {page} is replaced with the current one-based page number on every page where it appears. The token {pages} is replaced with the total structural page count of the source PDF — the count before any text is added. Replacement is deterministic, so the same token always expands to the same value across the document, which makes the output easy to verify.

The classic footer pattern Page {page} of {pages} therefore becomes Page 2 of 5 on the second page of a five-page document, Page 3 of 5 on the third, and so on. Both tokens can be used in the header, the footer, or split across them. The match is exact and lowercase: {Page} or {PAGES} are not recognized, and other brace text such as {date} is left unchanged so the tool does not silently lie about features it does not provide. Numbering always begins at one, the total always reflects the source document, and the same line appears on every structural page — there is no cover-page exclusion, starting-number offset, Roman-numeral mode, or separate odd/even alignment.

Footer text enteredResult on page 2 of a 5-page PDF
Page {page} of {pages}Page 2 of 5
{page}2
{pages}5
{page} / {pages}2 / 5
Confidential — {page}Confidential — 2
{date}{date} (left unchanged)

What stays unchanged and what does not

The source page count, page order, page dimensions, and existing visible content all remain in place. The header and footer are drawn as additional PDF content, not as a viewer-only overlay, so the labels persist when the file is opened in any compliant reader. Because the new text is drawn inside the existing page box, content already near an edge can overlap the new line — the tool does not move body content, detect a safe margin, read the document language, or avoid logos and crop marks. If your existing layout pushes anything to the top or bottom edge, plan for the new line to land on top of it.

If a header or footer would exceed the usable page width at the requested font size, the tool reduces the font size one point at a time, down to a 6-point floor, until the line fits. It does not stretch the text, wrap it to a second line, or silently remove characters. Very narrow pages or excessive margins can still leave little usable space, so inspect the resulting PDF before distributing it. Changing any setting revokes the previous download, so a stale asynchronous job cannot replace a newer file or text choice.

When a different tool is the right choice

Header Footer PDF is built for centered labels on every page — confidentiality notices, filenames, revision names, and basic Page X of Y numbering — in a private client-side workflow. It does not create multi-line headers, insert images or logos, switch content between odd and even pages, stamp section-specific numbering, add Bates numbers, embed dynamic dates, support rich or licensed fonts, draw hyperlinks, or make archival-conformance claims. If any of those features are required, a desktop publishing application that can embed the needed licensed font is the better fit.

For other routine PDF jobs that pair naturally with a stamped header or footer, the same browser can handle them without an upload: Add Page Numbers to PDF stamps numbers in a chosen corner when you only want the count and not the extra header line, and Add Watermark to PDF lays a centered diagonal label across the page when you need broader visual coverage rather than a margin line. For pages that are too narrow to fit a useful header, Resize PDF scales every page to A4, US Letter, or Legal so the stamped text has predictable room to breathe.