یہ گائیڈز فی الحال صرف انگریزی میں دستیاب ہیں۔

How to add a header and footer to a PDF

A header and footer turn a stack of pages into a finished document: a title at the top, “Page 3 of 12” at the bottom, a date, a confidentiality note. Word has them built in, but a PDF does not. This guide shows how to add them to any PDF, with page numbers and other values filled in for you.

5 min read · 994 words · Updated 12 November 2026

Header and Footer
Header and Footer
Add header and footer text to every page.
Open the tool

What headers and footers are for

A header is text at the top of every page, and a footer is text at the bottom. They keep readers oriented and they carry information that must not be missed. A report has its title in the header and page numbers in the footer. A contract has the names of the parties and a version in the header. A draft says “Draft” on every page. A confidential file says so at the bottom.

They are also practical: page numbers let you refer to a page in a conversation, and “Page 3 of 12” lets you notice that a page is missing from a printout. A date shows how recent a version is.

  • Page numbers such as “Page 3 of 12”.
  • Document title, company name or reference number on each page.
  • Version, “Draft” or “Confidential” labels.
  • The date of printing and the file name.

Open Header and Footer. The text is added in your browser and nothing is uploaded.

  • Drop your PDF into the box. A preview of the first page appears.
  • Type the text for the header and for the footer. Each has three boxes: left, centre and right.
  • Use the codes {n}, {t}, {date} and {file} where you want the page number, the total, today’s date and the file name.
  • Choose the font, the size, the colour and the distance from the edge, and choose which pages are changed.
  • Check the preview, click Add header and footer and download the result.

The codes you can use

Four codes are replaced on each page. {n} becomes the number of that page. {t} becomes the total number of pages in the document. {date} becomes today’s date. {file} becomes the name of the file without its extension. They can be mixed with your own words, so “Contract – {file}” in the header and “Page {n} of {t}” in the footer gives every page both.

The three positions let you build a typical layout: a title on the left, a date on the right and the page number in the middle. You do not need to fill all six boxes. Empty boxes add nothing. If you only want page numbers, Add Page Numbers is quicker.

Font, size, colour and margin

Headers and footers should be quiet. The defaults, a small grey text, are chosen so that they do not compete with the content. You can choose a sans-serif, serif or monospaced font, a size between 6 and 28 points, and any colour. Black or dark grey is best for printing.

The margin is the distance of the text from the edge of the page. A smaller distance places the text closer to the edge. Most printers cannot print right up to the edge, so keep a distance of about 28 points, which is roughly one centimetre, or more if your printer cuts things off. Make sure that long text does not run into the text of the page, and keep headers short.

Choosing which pages to change

By default every page gets the header and the footer. Tick “Skip the first page” if the first page is a cover or a title page. You can also choose odd or even pages, or type a custom list such as 2-5, 8. That is useful for double-sided documents or for adding a different label to a part of a document.

Rotated pages are handled correctly. If a page is stored sideways, the header and footer still appear at the top and bottom of the page as you see it.

Limits to know about

Headers and footers support letters, numbers and punctuation of the standard Latin alphabet. Arabic, Chinese, Cyrillic and other scripts are not supported in this tool yet. If you need text in another script on a page, use Edit PDF, which can add text in more languages.

The text is added on top of the existing pages, it does not change what is already there, and it is not part of a form. If you want to make it permanent and prevent anybody from moving it in a PDF editor, Flatten PDF can merge it into the page. For a large diagonal label such as “CONFIDENTIAL” use Watermark.

A practical example

Imagine a 12-page contract file called Service-Agreement. Put “{file}” in the header on the left and “Confidential” on the right. Put “Page {n} of {t}” in the middle of the footer and “{date}” on the right. Tick “Skip the first page” for the cover. The result has the name of the file and a confidentiality note on every page after the cover, plus page numbers and the date at the bottom. It takes less than a minute and happens on your device.

When you are done, protect the file with Protect PDF if it should be opened only by certain people, and reduce its size with Compress PDF before sending it.

Questions

Which values can I insert?

{n} for the page number, {t} for the total pages, {date} for today’s date and {file} for the file name.

Can I use left, centre and right?

Yes. The header and the footer each have a left, a centre and a right box.

Can I skip the first page?

Yes. Tick “Skip the first page”, or choose odd, even or custom pages.

Can I use Arabic or Chinese text?

Not yet. This tool supports the standard Latin alphabet. Use Edit PDF for other scripts.

Does it change my original text?

No. The new text is added on top of the pages.

Is my PDF uploaded?

No. Everything happens in your browser.

More guides