Skip to content
PDFBetter
View & edit

Add a header and footer to a PDF

Type text into any of six slots, use tokens for page numbers, date, title or file name, choose the pages, and download the finished PDF.

Drop a PDF here

or paste with Ctrl/⌘+V

Runs in your browser — files never leave your device. Free, no account.

PDF · up to 400 MB

Free, no account needed — download as soon as it's done. See plans

What it does

Add header and footer to PDF, explained

To add a header or footer to a PDF, type text into any of six slots (left, center and right at the top and at the bottom), choose the pages, and apply. Tokens are filled in per page: {n} the page number, {total} the last page number, {date} today's date, {title} the document title and {filename} the file name. PDFBetter does this in your browser; the file isn't uploaded.

Read more

Typical layouts: a project name top left and “Page {n} of {total}” bottom right on a report; “Confidential – {date}” across the top of a board pack; the file name in the footer so a printed page can be traced back to its file. Each slot is independent, so fill one or all six.

For double-sided printing, limit text to odd or even pages, or mirror the layout so left and right swap on even pages and the page number stays on the outside edge. A page range skips a cover, and setting the number on page 1 to 0 makes the page after the cover read 1.

The text is stamped into the page content, so it prints and shows in every reader. To add page numbers only, Add page numbers is quicker; for legal productions numbered across many files, use Bates numbering.

How to do it

Add a header and footer to a PDF in 4 steps

  1. 1Your PDF

  2. 2Set the mark

  3. 3On every page

  1. 1

    Add your PDF

    Drop the file. It is read in your browser; nothing is uploaded.

  2. 2

    Fill the slots

    Type into any header or footer slot. Use {n}, {total}, {date}, {title} and {filename} where the text should change per page or per file.

  3. 3

    Choose the pages

    Leave the range empty for every page or type one like 2-; optionally limit to odd or even pages or mirror even pages.

  4. 4

    Preview and download

    Flip through pages in the preview, adjust size, color and margins, then download the PDF.

Example

Before and after

Before

A 24-page quarterly report exported from a spreadsheet tool, with no header, footer or page numbers.

After

“Q3 board report” top left, “Confidential – 2026-10-18” top right and “Page 2 of 24” to “Page 24 of 24” bottom right in 9 pt dark grey on every page after the cover.

Settings & formats

What you can control

Six slots
Header left, center and right; footer left, center and right. Empty slots are skipped.
Tokens
{n} page number, {total} last page number, {date} today (YYYY-MM-DD), {title} document title (else the file name), {filename} file name.
Pages
All pages, or a range such as 2- or 1-10; pages outside it are left as they are.
Odd/even and mirror
Limit text to odd or even pages, or swap left and right slots on even pages for facing-page layouts.
Number on page 1
What {n} shows on the first physical page; 0 makes page 2 read 1.
Size, color and margins
Font size in points, text color, and separate side and top/bottom distances from the page edge.

Input

PDF

Output

PDF

Good to know before you start

  • Each slot holds one line of text. Line breaks, images and logos are not supported; use Add watermark or Add image for a logo.
  • Existing headers and footers are not detected or removed. If the PDF already has text there, the new text overlaps it; increase the margins or use other slots.
  • Long texts in neighboring slots can run into each other. Keep left and right short when the center slot is used.
  • Chinese, Japanese or Korean characters need a font subset from Google Fonts: only those characters are sent, never the PDF. Offline they print as “?”.
  • {title} reads the title stored in the PDF's properties and falls back to the file name. {date} is today's date as YYYY-MM-DD; type a date into the slot if you need another format.
  • The text becomes part of the page content; to change it later, start again from the original file. Password-protected PDFs must be unlocked first.
If something goes wrong
{title} shows the file name instead of the title.
The PDF has no title in its document properties. Type the title into the slot instead of using the token.
The footer sits on top of existing footer text.
Increase the top/bottom margin so the new text clears the old footer, or use the header slots instead.

Add header and footer to PDF: questions people ask

Can odd and even pages have different text?

Yes. Run the tool twice, once with Odd only and once with Even only. For page numbers on the outside edge, tick Mirror on even pages instead.

How do I skip the cover page?

Set the range to 2-. To make that page read 1, set the number on page 1 to 0.

What does {total} show?

The number of the last page, so “Page {n} of {total}” reads correctly. It follows the number you set for page 1.

Which date format does {date} use?

Today's date as YYYY-MM-DD, for example 2026-10-18. For another format, type the date into the slot.

Is my file uploaded?

No. Everything runs in your browser and the file never leaves your device.

Do I need an account?

No. This tool is free without an account.