Skip to content

PDF header & footer

Add Header & Footer

Add custom text headers and footers to every page of your PDF — supports page numbers, dates, and custom text

  • Runs in your browser
  • Nothing uploaded
  • No sign-up
  • Free, no daily limits
  1. 1Add your file
  2. 2Choose settings
  3. 3Download

Drop a PDF here

Choose a file

Select a PDF to add header and footer · up to 100 MB · nothing is uploaded

100% Private: All processing happens in your browser. Your files never leave your device.

Your file is safe

It is processed inside this browser tab and never uploaded, and it is gone when you close the page.

Good to know

  • The same header and footer text goes on every page.
  • Use {page}, {total} and {date} for the page number, page count and today's date.
  • Text uses Helvetica, so stick to Latin-script characters.

Last updated

Add Header and Footer stamps custom text across the top and bottom margins of every page in a PDF document. Header and footer bands are configured independently with dedicated alignment (left, center, or right), font size (8 pt to 16 pt), and custom color codes. Dynamic placeholder tokens ({page}, {total}, and {date}) automatically inject page numbering and timestamps client-side in your browser.

The application embeds StandardFonts.Helvetica via @cantoo/pdf-lib and sanitizes input strings to printable WinAnsi characters. All processing runs entirely inside local browser memory, ensuring confidential legal briefs and institutional reports are never uploaded to an external server.

How it works

  1. 1. Select your PDF

    Drag and drop your file into the upload zone or click to browse. The tool accepts files up to 100 MB directly into browser memory.

  2. 2. Configure header and footer text

    Enter your desired labels in the Header or Footer inputs. Insert dynamic tokens ({page}, {total}, {date}) using the quick-insert buttons.

  3. 3. Set alignment, font size, and color

    Select Left, Center, or Right alignment. Choose a font size between 8 pt and 16 pt, and pick a font color (such as black #000000, gray #666666, or blue #2563eb).

  4. 4. Apply and download

    Click Apply to N Pages to stamp the text into the PDF content streams, then click Download PDF to save your updated file with the -header-footer suffix.

When you'd use it

  • Marking sensitive business documents with confidentiality labels

    Stamp a top-right header reading 'Confidential - Internal Use Only' across internal audit memos and executive decks in a single click.

  • Standardising formal legal and academic submissions

    Insert a centered running footer with 'Page {page} of {total}' to meet strict court filing or university thesis formatting guidelines.

  • Timestamping contracts and versioned proposals

    Use the {date} token in the top-left margin to record the exact distribution date across project proposals and price quotes.

  • Displaying document titles across multipage packets

    Repeat the document title across top margins so physical printouts can be re-sorted easily if pages become separated.

Placeholder tokens and positioning options

TryDocsy evaluates dynamic tokens on each page loop using the resolveText() function in HeaderFooterClient.tsx. Below is the reference table of supported tokens and alignment options:

| Parameter | Supported Options | Underlying Mechanics | Sample Output | |---|---|---|---| | Placeholder: {page} | Dynamic integer | Evaluates current 1-based page index | 'Page 3' | | Placeholder: {total} | Dynamic integer | Evaluates document total page count | 'of 12' | | Placeholder: {date} | Localized date string | Evaluates new Date().toLocaleDateString() | '10/29/2026' | | Header Position | Top-Left, Top-Center, Top-Right | Fixed vertical offset: page.getHeight() - 40 pt | Top margin | | Footer Position | Bottom-Left, Bottom-Center, Bottom-Right | Vertical offset: 40 pt margin with baseline offset | Bottom margin | | Margin Offset | Fixed 40 points (0.55 in) | Outer clearance from physical paper edges | Safe printable zone | | Font & Encoding | Helvetica (StandardFonts) | WinAnsi sanitized; non-Latin glyphs stripped | Clean vector text |

Typography and WinAnsi encoding rules

Text is rendered using pdf-lib's built-in Helvetica font engine. Before drawing, the client runs sanitizeWinAnsi(text) to map smart typography (such as curly quotes, em dashes, and ellipses) to standard ASCII equivalents so characters render reliably.

Characters outside the WinAnsi code page (such as Devanagari, Tamil, Chinese, Arabic, and emoji) cannot be encoded by standard PostScript fonts and are automatically filtered out. If you need specialized multi-language annotations or watermark graphics, use Watermark PDF or Edit PDF.

Header and Footer vs Dedicated Page Numbers

If you only require running page counts at the bottom or top of your pages, Add Page Numbers offers pre-set formats (such as '- 1 -' or 'Page 1 of N') and configurable start numbers.

Use Header and Footer when you need to combine custom textual titles, confidentiality stamps, and dates with dynamic page counters simultaneously.

Frequently asked questions

How do I add page numbers and today's date in a PDF header or footer?

Open TryDocsy Header and Footer, type 'Page {page} of {total} - {date}' into the footer text box, pick your preferred alignment (such as Center), and click Apply. The engine replaces the tokens with the current page number, total count, and today's date on every page.

Can I set different header text on page 1 than page 2?

No. The header and footer text templates apply uniformly to every page in the document. Only the dynamic tokens {page}, {total}, and {date} vary from page to page. If you need different text across chapters, split the document first with /pdf/split, stamp each section, and merge them back with /pdf/merge.

Why are non-English characters missing from my header?

Standard PDF headers utilize the embedded Helvetica font, which is restricted to the WinAnsi Latin character set. Non-Latin scripts (such as Hindi, Arabic, or Chinese) and emoji are stripped out to prevent rendering corruption.

Can I add only a footer without adding a header?

Yes. Leave the Header field empty and enter your text into the Footer field, or vice versa. The tool only applies sections that contain text.

Will adding headers or footers reduce the quality of my document?

No. TryDocsy draws vector text directly into the page stream without rasterising or re-compressing your pages. Existing text, images, and formatting remain 100% sharp.

What is the margin distance for headers and footers?

The header is placed 40 points from the top edge of the page, and the footer is placed 40 points from the bottom edge. This ensures your text remains within the safe printable area of office desktop printers.