Saved

Press the star next to a tool's name to save it.

All my tools

Add Header and Footer to PDF

Use this tool to add header and footer to PDF pages: type the text, use {n} for the page number and {total} for the page count, pick where it sits and download the new PDF. It runs in your browser, so your file is never uploaded.

You can use {n} for the page number, {total} for the page count, {date} for today’s date and {file} for the file name. Leave a box empty to skip it.

The text is printed in Helvetica, black, 30 points from the page edge. Letters outside the basic Western set are replaced with a question mark. Existing page content is not moved.

Your PDF is changed on this device and is never uploaded.

Your PDF

Choose a PDF, type your header or footer and press Add header and footer.

What this tool does

Use this page to add header and footer to PDF files. A header is a line of text at the top of every page, and a footer is a line at the bottom. Typical uses are a document title, a company name, “Confidential”, the date and page numbers such as “Page 3 of 12”.

The tool opens your PDF, draws your text on top of every page and saves a new file. It uses pdf-lib, an open-source library for creating and changing PDFs in JavaScript. [2] The pages, text and pictures already in the PDF stay as they were. The new text is added as an extra layer.

  1. Choose your PDF.
  2. Type the header text, the footer text, or both. The footer starts as “Page {n} of {total}”.
  3. Pick the alignment for each line: left, centre or right.
  4. Set the font size. The range is 6 to 36 points.
  5. Tick “Leave the first page blank” if your first page is a cover.
  6. Press Add header and footer and download the result.

The special words you can type

Type thisYou getExample
{n}The page number3
{total}The number of pages12
{date}Today’s date20 November 2026
{file}The file name without .pdfannual-report

You can mix them with your own words. “{file} · {date} · Page {n} of {total}” prints something like “annual-report · 20 November 2026 · Page 3 of 12”. The date is the day you press the button, taken from your device clock.

Cover pages and numbering

If you tick “Leave the first page blank”, nothing is printed on page 1 and numbering starts at 1 on page 2. The total then counts only the pages that carry text, so a 12-page PDF reads “Page 1 of 11” on its second page. This matches how most reports treat a cover.

Layout details

  • The text sits 30 points (about 10 mm) from the top or bottom edge of each page. A point is 1/72 of an inch. [1]
  • Left and right text sits 30 points from the side edge. Centre text is centred on the page.
  • The standard Helvetica font is used because it is built into every PDF reader, so no font has to be stored in the file. [2]
  • Text is black. If your pages have a dark background at the edge, the text may be hard to read.
  • Rotated pages are written in the page’s own direction, which can look sideways in a viewer that shows the rotation.

Things to check before you share the file

  • Look at the first and last page. A footer can overlap a page’s own footer if the margin is small.
  • Use a smaller font if a long line runs off the page.
  • Only basic Western letters, numbers and common punctuation are supported. Other letters become a question mark, so check names with accents or other scripts.
  • Keep your original. The tool never changes it, but it is good practice to compare.

A worked example

You have a 10-page contract with a cover page. In the header box you type “Confidential”, aligned right. In the footer box you leave “Page {n} of {total}”, aligned centre, and tick “Leave the first page blank”. On page 2 the header reads “Confidential” at the top right and the footer reads “Page 1 of 9”. On page 10 it reads “Page 9 of 9”. The cover page has neither. The numbers count from the first page that carries text, which is how legal and business documents are usually numbered.

For a report you might use the footer “{file} · {date} · Page {n} of {total}”. The line then tells every reader which file the page came from and when it was stamped, which is helpful when printed pages get mixed up on a desk.

Common mistakes

  • Forgetting the braces. “Page n” prints exactly that. Write {n} so the tool puts in the number.
  • Using a font size that is too large. Twelve points or less usually fits a footer on A4 or Letter pages.
  • Stamping a PDF that already has a footer. You will get two lines. Check your original first.
  • Expecting the date to be the date the PDF was made. It is today’s date from your device clock when you press the button.
  • Typing non-Western characters. They are replaced with a question mark in this tool.

If you only want page numbers, the Add Page Numbers to PDF tool has a choice of six positions and a first-number setting. If you want a diagonal word such as DRAFT across the page, use the Add Watermark to PDF tool. This tool is best when you need words, dates and numbers together at the top and bottom of every page.

Because the text is drawn on top of the page, it cannot be edited later as part of the original document. If you need to change it, start again from your original file and run the tool with the new text.

Privacy

The PDF never leaves your device. It is opened, changed and saved by code running in your browser tab. Nothing is stored after you close the page.

If you only need page numbers and nothing else, the Add Page Numbers to PDF tool offers six positions and a start number. This tool is better when you want your own words, the date or the file name as well.

What next

Use this often? Add Add Header a to your Home screen.

Frequently asked questions

How do I add header and footer to PDF files?

Choose the PDF, type the header or footer text, pick the alignment and size, then press Add header and footer. Use {n} for the page number and {total} for the page count.

Can it print “Page 2 of 10”?

Yes. The footer starts as “Page {n} of {total}”, which prints that on every page. You can change the words.

Can I skip the first page?

Yes. Tick “Leave the first page blank”. Numbering then starts at 1 on page 2.

Does it change the rest of my PDF?

No. It draws the new text on top of each page. The existing text, pictures and layout stay as they are.

Why do some letters show as question marks?

The built-in Helvetica font supports basic Western characters only. Other letters are replaced with a question mark so the file stays valid.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More PDF Tools