All tools

Add a Header and Footer to a PDF

Add a header, a footer or both to every page. Use {n}, {total}, {date} and {filename} to insert the page number, page count, today's date and the file name.

Drop your file here

Put your own text at the top and bottom of PDF pages. Placeholders fill in the page number, page count, date and file name for you.

How to use Header & Footer

  1. Choose or drop your PDF file.
  2. Type a header, a footer or both, using {n}, {total}, {date} and {filename} where you want them.
  3. Choose left, centre or right alignment for each, and optionally limit the pages, for example "2-".
  4. Set the font, colour, size and distance from the edge.
  5. Click Add header & footer and download the PDF.

What it does

  • Separate header and footer text, each aligned left, centre or right.
  • Placeholders for page number {n}, page count {total}, today's date {date} and file name {filename}.
  • Apply to all pages or to a page range.
  • Choice of Helvetica, Helvetica Bold, Times or Courier, any colour, 6 to 36 pt size and 3 to 40 mm edge distance.
  • Hindi (Devanagari), Cyrillic and other non-Latin text is drawn with fonts embedded in the PDF.
  • Works correctly on rotated and cropped pages.

Good to know

  • Chinese, Japanese and Korean characters are not supported.
  • {n} is the page's real position in the file, so it does not restart when you skip pages; use the Page Numbers tool for a custom start number.
  • Text is placed on a single line and is not wrapped.

Your files and privacy

The header and footer are added in your browser and the PDF is not uploaded; fonts for non-Latin text are downloaded from Docshar only when needed. If you are signed in, Docshar counts your operations (tool, number of files, sizes and page counts), never the file contents. See the Privacy Policy.

Questions

What does {date} show?

Today's date, written in your browser's local date format at the moment you create the file.

Can I add a header in Hindi?

Yes. Devanagari and Cyrillic characters are drawn with fonts downloaded from Docshar and embedded in the PDF, so the text shows correctly in other viewers.

Can I add only a footer?

Yes. Leave the header box empty to add only a footer, or the other way round. At least one of them must have text.